How to remove old Docker containers

This question is related to Should I be concerned about excess, non-running, Docker containers?. I’m wondering how to remove old containers. The docker rm 3e552code34a lets you remove a single one, but I have lots already. docker rm –help doesn’t give a selection option (like all, or by image name). Maybe there is a directory … Read more

How do I get into a Docker container’s shell?

I’m getting started working with Docker. I’m using the WordPress base image and docker-compose. I’m trying to ssh into one of the containers to inspect the files/directories that were created during the initial build. I tried to run docker-compose run containername ls -la, but that didn’t do anything. Even if it did, I’d rather have … Read more

Docker: Copying files from Docker container to host

I’m thinking of using Docker to build my dependencies on a Continuous Integration (CI) server, so that I don’t have to install all the runtimes and libraries on the agents themselves. To achieve this I would need to copy the build artifacts that are built inside the container back into the host. Is that possible? … Read more

What is the difference between the ‘COPY’ and ‘ADD’ commands in a Dockerfile?

What is the difference between the COPY and ADD commands in a Dockerfile, and when would I use one over the other? COPY <src> <dest> The COPY instruction will copy new files from <src> and add them to the container’s filesystem at path <dest> ADD <src> <dest> The ADD instruction will copy new files from … Read more

How is Docker different from a virtual machine?

I keep rereading the Docker documentation to try to understand the difference between Docker and a full VM. How does it manage to provide a full filesystem, isolated networking environment, etc. without being as heavy? Why is deploying software to a Docker image (if that’s the right term) easier than simply deploying to a consistent … Read more