How to specify container options in docker compose file

Hi,

I am running multiple containers using a docker-compose.yml file on a raspberry pi.
I would like to specify some options for one of those containers.
How can I do this ?

To be more specific:
I am using the docker image dastrasmue/rpi-samba and
I want to set the option -v /data:/share/data but I have no clue how I can do this in a multi container application running on the balena OS.

I have also posted this question in stackoverflow: https://stackoverflow.com/questions/53801558/how-to-specify-container-options-in-docker-compose-file

Using the command command it is possible to specify the container options.

So the following worked in my docker compose yml file:

volumes:
    node-red-data:
services:
  samba:
    image: dastrasmue/rpi-samba 
    command: -s "Public (readonly):/mount:ro:"
    volumes:
       - 'node-red-data:/mount'
    ports:
      - "139:139"
      - "445:445"
...
2 Likes

Thank you for sharing your question and answer @janvda :smiley::muscle:
It is highly apprecuated!