Docker
Resources
History
Docker container technology was launched in 2013 as an open source Docker Engine. It leveraged existing computing concepts around containers and specifically in the Linux world, primitives known as cgroups and namespaces. Docker's technology is unique because it focuses on the requirements of developers and systems operators to separate application dependencies from infrastructure. Success in the Linux world drove a partnership with Microsoft that brought Docker containers and its functionality to Windows Server (sometimes referred to as Docker Windows containers).
Concepts
Docker runs on a Host Operating System.
Container
- A Docker container is a lightweight, standalone, executable package of software that includes everything needed to run an application: code, runtime, system tools, system libraries and settings, but in difference to VMs it does not include the (guest) OS layer (difference between Docker and VMs see here).
- Containers isolate software from its environment and ensure that it works uniformly despite differences for instance between development and staging.
- A docker container is running on the Docker engine (lightweight container). Multiple container can run on the same environment.
Images
- A Docker image is a template with instructions for creating Docker containers and is build using a file called Docker file. The Docker image is stored in the Docker Hub or in a registry.
- Docker image ---> commands (pull from repository, …) ---> Docker container
Volumes
- Volumes are folder on the host which are mounted to a container.
Commands
docker exec … docker image (ls | prune | …) docker network create docker run (--link | …) docker ps docker rm docker start docker stop docker volume (create | ls | rm | prune | …) // /var/lib/docker/volumes/<VOLUME_NAME>