I just finished a long process of configuring and debugging a Docker Compose-based dev environment. Several late-night hours! I think I’ve got everything accounted for, and thought I’d share:
15 Likes
It is awesome. One suggestion is to group RUN in Dockerfile. Each RUN is a layer. It should be 3. For system, phoenix and node. It would be faster
1 Like
Thanks! I’ll give that a shot, and update it.
Thx for your work. How do you sync your local code with the container? Via docker volume?
According to the compose file, your sources are bind mounted to /app
in the container.
If your hosts architecture/OS differs from what is inside of the docker, this bind mount might cause trouble, especially if you have an editor on the host that does compile on save or some code analysis that relies on compiled artifacts.
4 Likes