In order to see changes in your working directory inside docker, as far as I understand on the docker-compose.yml
you need to map the volume to the directory you are going to work.
currently I have this
web:
build: .
ports:
- "8080:8080"
volumes:
- .:/data/app
Therefore I'm mapping my machine directory .
to the container on the data/app
folder, but if I do this I get this error:
ERROR: for web Cannot start service web: oci runtime error: container_linux.go:247: starting container process caused "exec: \"bin/develop.sh\": stat bin/develop.sh: no such file or directory"
ERROR: Encountered errors while bringing up the project.
If I don't set the volumes
tag the container actually boots and all but any change I made into the directory is not transfer to the container.
web:
build: .
ports:
- "8080:8080"
NOTE: this exact same configuration works on my coworkers machines, the server, and even on my mac, the only one giving issues with the volumes
is my ubuntu machine and don't understand why.
Docker versions runing on Ubuntu 16.10
:
Docker version 17.04.0-ce, build 4845c56
docker-compose version 1.11.2, build dfed245
UPDATE
for CMD
I have this ./bin/start.sh
which contains
#!/usr/bin/env bash
/usr/bin/supervisord -c ./config/supervisord.conf
In the Docker file I have this
ENV APP_DIR /data/app/
WORKDIR $APP_DIR
And the working directory inside the container is: /data/app
.