Docker Installation On A Debian, Ubuntu, Alpine, Arch, Kali, CentOS, Fedora, Raspbian And MacOS

Docker Installation On A Debian, Ubuntu, Alpine, Arch, Kali, CentOS, Fedora, Raspbian And MacOS

docker

Manage Docker containers and images.

Maintainer: Paul Tagliamonte


Section: x11

Install docker

  • Debian apt-get install docker Click to copy
  • Ubuntu apt-get install docker Click to copy
  • Alpine OS apk add docker Click to copy
  • Arch Linux pacman -S docker Click to copy
  • Kali Linux apt-get install docker.io Click to copy
  • CentOS yum install docker.io Click to copy
  • Fedora dnf install docker.io Click to copy
  • Raspbian apt-get install docker.io Click to copy
  • macOS brew install docker Click to copy

Manage Docker containers and images.

How to use docker?

Below are few example commands for docker that you can use in the terminal.

List currently running docker containers:
docker psClick to copy
List all docker containers (running and stopped):
docker ps -aClick to copy
Start a container from an image, with a custom name:
docker run --name container_name imageClick to copy
Start or stop an existing container:
docker start|stop container_nameClick to copy
Pull an image from a docker registry:
docker pull imageClick to copy
Open a shell inside of an already running container:
docker exec -it container_name shClick to copy
Remove a stopped container:
docker rm container_nameClick to copy
Fetch and follow the logs of a container:
docker logs -f container_nameClick to copy
Install the latest version of docker in Debian, Ubuntu, Alpine, Arch, Kali, CentOS, Fedora, Raspbian and macOS from terminal. To install the docker just copy the above command for your OS and run into terminal. After you run the command it will grab the latest version of docker from the respository and install it in your computer/server.