3👍
✅
volumes in your docker-compose.yml does this. Once you remove volumes
your changes shuldn’t be reflected in a container.
2👍
The exec command does not update files between host and container. What is causing the files to be synced between container and host is the volume declared inside the compose file.
The volume declaration mounts the directory .
onto /code
inside the container, such that any changes done to any file inside the host current directory are reflected in the /code
directory inside the container and vice versa.
Source:stackexchange.com