# How to specify container options in docker compose file

**URL:** <https://forums.balena.io/t/how-to-specify-container-options-in-docker-compose-file/4728>\
**Category:** balenaOS\
**Created:** [December 15, 2018, 10:36pm UTC](https://forums.balena.io/t/how-to-specify-container-options-in-docker-compose-file/4728 "2018-12-15T22:36:26Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![janvda](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/janvda/32/1271_2.png) [@janvda](https://forums.balena.io/u/janvda)\
**Post date:** [December 15, 2018, 10:36pm UTC](https://forums.balena.io/t/how-to-specify-container-options-in-docker-compose-file/4728/1 "2018-12-15T22:36:26Z")

</div>

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](https://github.com/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.

---

<div class="post-metadata">

**Author:** ![janvda](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/janvda/32/1271_2.png) [@janvda](https://forums.balena.io/u/janvda)\
**Post date:** [December 16, 2018, 11:06am UTC](https://forums.balena.io/t/how-to-specify-container-options-in-docker-compose-file/4728/2 "2018-12-16T11:06:02Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![janvda](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/janvda/32/1271_2.png) [@janvda](https://forums.balena.io/u/janvda)\
**Post date:** [December 17, 2018, 8:55am UTC](https://forums.balena.io/t/how-to-specify-container-options-in-docker-compose-file/4728/3 "2018-12-17T08:55:01Z")

</div>

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"
...
```

---

<div class="post-metadata">

**Author:** ![dansku](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/dansku/32/1183_2.png) [@dansku](https://forums.balena.io/u/dansku)\
**Post date:** [December 17, 2018, 9:43am UTC](https://forums.balena.io/t/how-to-specify-container-options-in-docker-compose-file/4728/4 "2018-12-17T09:43:08Z")

</div>

Thank you for sharing your question and answer @janvda 😃💪  
It is highly apprecuated!
