docker usually refers to a set of open-source tools that allow developers to build and run containers individually or as a 'stack' of related containers. A container is an isolated package that contains everything, except for the kernel, needed to run a piece of software. Docker was originally written to work with Linux and has more recently been implemented on MS Windows. Docker Inc. is the company behind the open-source
Docker builds a high-level API over execution drivers, such as OpenVZ, systemd-nspawn, libvirt-lxc, libvirt, QEMU/KVM, BSD Jails, Solaris Zones, and chroot to run processes with some degree of isolation and repeatability across environments. The default execution driver since release 0.9 is Docker's own libcontainer driver. It's mainly written in Go and its source-code can be found on Github. See Docker's official website for details.
For a docker installation on different operating systems such as Linux, Windows, or OS X, details can be found here; from this site, information about Docker under Windows, Mac or Linux distributions can be accessed. On Windows and OS-X, docker runs in some variety of VM.
Releases have three types: stable, edge and test. The latest stable version is given by the following badge (which links to the corresponding release notes):
Note that since May 2017, docker is a product (split into CE and EE) built on top of the open-source project Moby. In November 2019 Docker Inc. sold its enterprise business and software to Mirantis. For more, see "Demystifying the Relationship Between Moby & Docker".
Where to ask
Questions on Stack Overflow must be programming-related; see the extended description in the help center for more details. Questions about using Docker as a live development environment, mechanics of the Dockerfile system, and other questions that clearly involve application source code are generally welcome.
Questions about installing Docker or running prebuilt images are typically not programming-oriented and are not on-topic for Stack Overflow. Consider asking these questions on Super User, or a site more specific to your host operating system (Ask Ubuntu, Unix & Linux, Raspberry Pi Stack Exchange, Ask Different for MacOS). Questions about using a Linux distribution package manager such as
apk are similarly not appropriate for Stack Overflow, even if they are otherwise in the context of a Dockerfile.
Frequently asked questions
If code in one Compose-managed Docker container needs to connect to another, it needs to use the other container's Compose service name and the standard port for the service, ignoring the Compose
ports:. The special host name
localhostrefers to the current container and not a different container or the host. See Networking in Compose in the Docker documentation, or accessing a docker container from another container.
If code in a Docker container needs to reach a service such as a database running on the same host but not in a container, on MacOS and Windows hosts it needs to connect to the special host name
host.docker.internal. See From inside of a Docker container, how do I connect to the localhost of the machine?.
Where to start
- Docker Curriculum: A comprehensive tutorial for getting started with Docker. Teaches how to use Docker and deploy dockerized apps on AWS with Elastic Beanstalk and Elastic Container Service.
- Docker Documentation: the official documentation
- Docker Training :heavy_dollar_sign:
- Katacoda: Learn Docker using Interactive Browser-Based Labs
- Learn Docker: a step-by-step tutorial and more resources (video, articles, cheat sheets) by @dwyl
- Play With Docker: PWD is a great way to get started with Docker from beginner to advanced users. Docker runs directly in your browser.
- Play With Moby: PWM is a web-based Moby playground which allows you to try different components of the platform in seconds. It gives you the experience of having a free Alpine Linux Virtual Machine in the cloud where you can build and run Moby projects and even create clusters to experiment.
- Practical Introduction to Container Terminology The landscape for container technologies is larger than just docker. Without a good handle on the terminology, It can be difficult to grasp the key differences between docker and (pick your favourites, CRI-O, rkt, lxc/lxd) or understand what the Open Container Initiative is doing to standardize container technology.
- Docker Tutorial for Beginners (Updated 2019 version) — In this Docker tutorial, you'll learn all the basics and learn how you can containerize Node.js and Go applications. Even if you aren't familiar with these languages it should be easy for you to follow this tutorial and use any other language.
- The Docker Book – Containerization is the new virtualization
- Pro Docker
- Docker in Action
- Docker in Practice
- Using Docker – Developing and Deploying Software with Containers
- Docker: Up & Running – Shipping Reliable Containers in Production
- Build Your Own PaaS with Docker
- Orchestrating Docker
- Docker Cookbook – Solutions and Examples for Building Distributed Applications
- Docker Hands on – Deploy, Administer Docker Platform
- Learning Docker – Faster app development and deployment with Docker containers
- Docker in Production – Lessons from the Trenches
Development with Docker
- ahab - Docker event handling with Python by @instacart
- clj-docker-client :construction: - Idiomatic Clojure client for the Docker remote API. By @lispyclouds
- Docker Client for JVM - A Docker remote api client library for the JVM, written in Groovy by [@gesellix][gesellix]
- docker-client - Java client for the Docker remote API. By [@spotify][spotify]
- docker-it-scala - Docker integration testing kit with Scala by @whisklabs
- docker-java-api - Lightweight, truly object-oriented, Java client for Docker's API. By @amihaiemil
- docker-maven-plugin - A Maven plugin for running and creating Docker images by @fabric8io
- Docker-PowerShell - PowerShell Module for Docker
- Docker.DotNet - C#/.NET HTTP client for the Docker remote API by @ahmetalpbalkan
- dockerfile-maven - A Maven plugin for building and pushing Docker images by [@spotify][spotify]
- dockerode - Docker Remote API node.js module by @apocas
- DoMonit - A simple Docker Monitoring wrapper For Docker API
- go-dockerclient - Go HTTP client for the Docker remote API by @fsouza
- Gradle Docker plugin - A Docker remote api plugin for Gradle by [@gesellix][gesellix]
- libcompose - Go library for Docker Compose.
- Portainer stack utils :construction: - Bash script to deploy/update/undeploy Docker stacks in a Portainer instance from a docker-compose yaml file. By @greenled.
- sbt-docker-compose - Integrates Docker Compose functionality into sbt by @kurtkopchik
- sbt-docker - Create Docker images directly from sbt by @marcuslonnberg
- Buddy :heavy_dollar_sign: - The best of Git, build & deployment tools combined into one powerful tool that supercharged our development.
- Captain - Convert your Git workflow to Docker containers ready for Continuous Delivery by @harbur.
- Cyclone - Powerful workflow engine and end-to-end pipeline solutions implemented with native Kubernetes resources by @caicloud.
- Docker plugin for Jenkins - The aim of the docker plugin is to be able to use a docker host to dynamically provision a slave, run a single build, then tear-down that slave.
- Drone - Continuous integration server built on Docker and configured using YAML files.
- GitLab Runner - GitLab has integrated CI to test, build and deploy your code with the use of GitLab runners.
- GOCD-Docker - Go Server and Agent in docker containers to provision.
- Microservices Continuous Deployment - Continuous deployment of a microservices application.
- mu - Tool to configure CI/CD of your container applications via AWS CodePipeline, CodeBuild and ECS @Stelligent
- Screwdriver :heavy_dollar_sign: - Yahoo's OpenSource build platform designed for Continous Delivery.
- Skipper - Easily dockerize your Git repository by @Stratoscale
- SwarmCI - Create a distributed, isolated task pipeline in your Docker Swarm.
- Watchtower - Automatically update running Docker containers by [@CenturyLinkLabs][centurylinklabs]
- Awesome Docker
- Fullstack Python Docker Resources
- Play with Docker classroom, an interactive in-browser Docker learning site
docker docker-image docker-container docker-compose docker-networking docker-build docker-volume dockerfile docker-swarm devops boot2docker docker-machine docker-registry