Well, docker-compose up won't build images for your Node containers from the Dockerfile(s), since the container file system is just the contents of yo

dnv

submited by
Style Pass
2021-07-26 04:00:06

Well, docker-compose up won't build images for your Node containers from the Dockerfile(s), since the container file system is just the contents of your project directory plus the dependency directory (node_modules or .yarn), and DNV manages that. Consequently, changing dependencies for your project doesn't require rebuilding an image, so that's quick and painless.

If you're just starting development and don't have your Node dependencies nailed down yet, absolutely. It will make developing with Docker Compose much more pleasant. Otherwise, you probably won't get much benefit from it.

Also, when using the external volume option you should use dnv stop to stop a docker compose project originally started with dnv ui / dnv up, rather than through the Docker Desktop UI (since it doesn't remember that the project was started with a unique .yml file)

DNV generates a separate .yml file to use with docker-compose up when you're utilizing the external volume option. This simply copies your docker-compose.yml and adds in the necessary parts to define the external volume. Note that this is re-generated (when needed) from scratch every time changes are detected, so any modifications you make in docker-compose-dnv-gen.yml will be lost (the --nosync flag bypasses this, for testing purposes). In other words, edit your docker-compose.yml as usual, and those changes will get transferred to docker-compose-dnv-gen.yml the next time you run dnv ui / dnv up.

Leave a Comment
Related Posts