I trying to change the propagation settings of docker compose. Below is my yaml file.
version: '3.2'
services:
web:
build:
context: .
dockerfile: Dockerfile.dev
ports:
- "3000:3000"
volumes:
- /app/node_modules
- type: bind
source: .
target: /app
bind:
propagation: shared
However when I docker-inspect the container the volume is still rprivate.
"Mounts": [
{
"Type": "bind",
"Source": "/c/users/pinku/Desktop/workflow/frontend",
"Destination": "/app",
"Mode": "rw",
"RW": true,
"Propagation": "rprivate"
},
{
"Type": "volume",
"Name": "9a085880e8938e31a5b8d4a66b53700b26d3b279799d614a26e82134dd0f58d5",
"Source": "/mnt/sda1/var/lib/docker/volumes/9a085880e8938e31a5b8d4a66b53700b26d3b279799d614a26e82134dd0f58d5/_data",
"Destination": "/app/node_modules",
"Driver": "local",
"Mode": "",
"RW": true,
"Propagation": ""
}
]
Any idea about what i'm doing wrong?
There are a bunch of related GitHub issues: https://github.com/docker/compose/issues/5212 and https://github.com/moby/moby/issues/34936
Try to update your docker-compose installation (1.21+) and change the value of version directive to at least version "3.3".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With