docker

  • Compose file v3 dropped volumes_from

    A version 2 file could share a container’s volumes with volumes_from, which is how the data-container pattern worked. Version 3 removes it, because a scheduler placing containers on…

  • Show the size of every Docker image layer

  • Container memory limits and the OOM killer

    A container without a memory limit can take the host down. A container with one gets its process killed by the kernel, which from inside looks like the…

  • Swarm mode is in the engine and mostly unused

    Since 1.12 the engine has had orchestration built in — docker swarm init and a cluster exists. It is genuinely simple and almost nobody is running it, which…

  • depends_on does not wait for readiness, and never did

    depends_on controls start order and nothing else. The database container being started is not the database accepting connections, so the application starts, fails to connect, and exits. Version…

  • Multi-stage builds arrived in 17.05

    Building assets inside the runtime image drags a compiler toolchain into production, and deleting it afterwards does nothing because layers are additive. Until May the workaround was two…

  • Copy a file out of a running container

  • docker exec attaches; docker-compose run creates

    The two commands look like alternatives and do different things. exec runs a process inside a container that is already up; run starts a new container from the…

  • A deployment pipeline that runs the tests first

    Deploying by rsync on a Friday afternoon, and what replaced it: lint, test, build, stage, promote — with a rollback that is the same mechanism rather than a…

  • Container logs go to stdout, and that is the contract

    A containerised application writing to /var/log/app.log has written to a filesystem that disappears with the container, and nothing outside can see it. The convention is that a container…