Hi, guys, I wanna add my code directory as a volume to the container, launching the containers by docker-compose up
.
I know volumes
attribute in docker-compose.yml
file, but the code directory differs from each of my colleagues. I checked the doc, but not found -v
or similar parameter.
Any help is appreciated.
You can use variable interpolation to set the volume path with a variable:
volumes:
- '$SOURCE_VOLUME:/code'
In the next release (1.5.0) we're adding support for overriding options from a separate docker-compose.override.yaml
which would allow each of you to have an override with the path you want.
Thanks for reply. I'll try variable interpolation
~
Looking forward to the next release.
Most helpful comment
You can use variable interpolation to set the volume path with a variable:
In the next release (1.5.0) we're adding support for overriding options from a separate
docker-compose.override.yaml
which would allow each of you to have an override with the path you want.