-
-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Docker containers should contain as little content as possible, and when possible - not be live.
Using:
volumes:
- .:/appBoth loads the container with a lot of unnecessary files AND makes it "live", meaning that any changes in the source code automatically get applied inside the container, which is an antipattern. Containers should be self-sustaining and isolated.
Mounting source code like this should only be done for debugging.
A few required corrections:
- In the
Dockerfiles, use theCOPYorADDdirectives to copy the necessary files to the container image, as selectively as possible. - Maintain a seperate
docker-compose.yamlfile for debugging and for production, with only the debugging one containing the mounting. - The
stylecontainer might also be redundant in such a case - just compile SASS once and avoid having to usewatch(since again, that is for live debugging)
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working