问题
So I'm in a developemnt environment and I'm binding my code inside a container using Mount Bind in my docker-compose file:
...
volumes:
- ./my-code:/home/node/app
- /home/node/app/node_modules
...
But I still need do COPY inside my Dockerfile in order to make this work.
COPY --chown=node:node . .
What I don't get is. If I'm binding my code to the container inside docker-compose.yml, why do I still need to copy all my code in the Dockerfile?
来源:https://stackoverflow.com/questions/62734082/why-do-i-still-need-to-do-copy-in-my-dockerfile-if-im-using-a-bind-mount