Repository for centralized Docker Compose templates, configurations, and resources to streamline containerized application setup and deployment across projects
docker run [OPTIONS] IMAGE [COMMAND] [ARG...]- Run a command in a new container
docker start [OPTIONS] CONTAINER [CONTAINER...]- Start one or more stopped containers
docker stop [OPTIONS] CONTAINER [CONTAINER...]- Stop one or more running containers
docker build [OPTIONS] PATH | URL | -- Build an image from a Dockerfile
docker pull [OPTIONS] NAME[:TAG|@DIGEST]- Pull an image or a repository from a registry
docker push [OPTIONS] NAME[:TAG]- Push an image or a repository to a registry
docker exec [OPTIONS] CONTAINER COMMAND [ARG...]- Run a command in a running container
docker logs [OPTIONS] CONTAINER- Fetch the logs of a container
docker-compose up [OPTIONS] [SERVICE...]- Build, (re)create, start, and attach to containers for a service
docker-compose down [OPTIONS]- Stop and remove containers, networks, images, and volumes
docker inspect [OPTIONS] CONTAINER|IMAGE- Return low-level information on Docker objects
docker stats [OPTIONS] [CONTAINER...]- Display a live stream of container(s) resource usage statistics
docker network ls- List all networks
docker volume ls- List all volumes
docker system prune [OPTIONS]- Remove unused data
- Use multi-stage builds to reduce image size
- Always specify a version for the base image
- Use
.dockerignoreto exclude unnecessary files - Minimize the number of layers in the Dockerfile
- Use
COPYinstead ofADDunless you need to extract a tar file
- Use
docker logs [CONTAINER]to view container logs - Use
docker exec -it [CONTAINER] /bin/bashto access a running container - Use
docker ps -ato list all containers, including stopped ones - Use
docker-compose logs [SERVICE]to view logs for a specific service in a Docker Compose setup - Use
docker system dfto view disk usage by Docker
- Docker Desktop for Mac
- Docker Desktop for Windows
- Docker Engine on Ubuntu
- Docker Engine on CentOS
- Docker Engine on Debian
- Docker Engine on Fedora
- Docker Engine on Raspbian
Docker was initially released in March 2013 by Solomon Hykes, as an internal project within dotCloud, a platform-as-a-service company. Docker's primary innovation was to make containers easy to use and portable, allowing developers to package applications and their dependencies into a single container that could run on any system with Docker installed. This solved many issues related to environment consistency and dependency management, making it easier to develop, test, and deploy applications.
Docker quickly gained popularity and became the de facto standard for containerization. In 2014, Docker Inc. was formed, and the company shifted its focus entirely to Docker. Over the years, Docker has continued to evolve, adding new features and integrations, and has become a cornerstone of modern DevOps practices and cloud-native application development.
- Portainer: A powerful, open-source management UI for Docker.
- Rancher: An open-source platform for managing Kubernetes and Docker in production.
- Kitematic: A simple application for managing Docker containers on Mac and Windows.
- Watchtower: A process for automating Docker container base image updates.
- LazyDocker: A simple terminal UI for both Docker and Docker Compose.