Multicontainer short syntax volume


#1

Hello,
I’m using the new multicontainer feature.
I’ve successfully built and deployed my microservices using the docker-compose below and everything is fine except for a volume mapping.

version: '2'
services:
# some more services
  openalpr:
    build: ./openalpr
    network_mode: "bridge"
    labels:
      io.resin.features.supervisor-api: '1'
      io.resin.features.resin-api: '1'
    depends_on: 
      - mqtt
      - supervisor
      - redis
    volumes:
      - /dev/null:/dev/raw1394

The docs specify that the following on volumes:

Only support short syntax and named volumes. Bind mounts are not supported, except for as allowed by resin.io specific labels

The docker-compose-v2 docs say that short syntax is of this format:

The short syntax uses the generic [SOURCE:]TARGET[:MODE] format, where SOURCE can be either a host path or volume name. TARGET is the container path where the volume is mounted. Standard modes are ro for read-only and rw for read-write (default).
Specify an absolute path mapping

  • /opt/data:/var/lib/mysql

The example above looks a lot like my /dev/null:/dev/raw1394
Do the docs mean that you only support named volumes in the short syntax?

The problem I’m trying to solve here is the following SO issue:


How would I go about this?

Thanks in advance!


#4

Update: I fixed it by adding ln -s /dev/null /dev/raw1394 to the cmd/entrypoint as specified here.