docker-compose up vs docker-compose up –build vs docker-compose build –no-cache

The following only builds the images, does not start the containers: docker-compose build The following builds the images if the images do not exist and starts the containers: docker-compose up If you add the –build option, it is forced to build the images even when not needed: docker-compose up –build The following skips the image … Read more

Is it safe to clean docker/overlay2/

Docker uses /var/lib/docker to store your images, containers, and local named volumes. Deleting this can result in data loss and possibly stop the engine from running. The overlay2 subdirectory specifically contains the various filesystem layers for images and containers. To cleanup unused containers and images, see docker system prune. There are also options to remove … Read more

Docker-compose: node_modules not present in a volume after npm install succeeds

This happens because you have added your worker directory as a volume to your docker-compose.yml, as the volume is not mounted during the build. When docker builds the image, the node_modules directory is created within the worker directory, and all the dependencies are installed there. Then on runtime the worker directory from outside docker is … Read more

Docker “ERROR: could not find an available, non-overlapping IPv4 address pool among the defaults to assign to the network”

I’ve seen it suggested docker may be at its maximum of created networks. The command docker network prune can be used to remove all networks not used by at least one container. My issue ended up being, as Robert commented about: an issue with openvpn service openvpn stop ‘solved’ the problem.