DEV Community

Cover image for Installing Docker
Vikki
Vikki

Posted on

Installing Docker

Docker

Installing Docker

Docker is installed via package manager.

Arch Linux

$ sudo pacman -S docker
Enter fullscreen mode Exit fullscreen mode

Debian/Ubuntu Linux

$ sudo apt-get install docker.io
Enter fullscreen mode Exit fullscreen mode

Starting Docker Engine

Start the Docker daemon which provides the Docker Engine. This process serves the Docker API and manages Docker containers.

$ sudo systemctl start docker.service
Enter fullscreen mode Exit fullscreen mode

If you want Docker Engine to automatically start when you system boots issue the below command.

$ sudo systemctl enable docker.service
Enter fullscreen mode Exit fullscreen mode

Verify that Docker Engine is running.

$ docker info
Enter fullscreen mode Exit fullscreen mode

Verify that you can run containers. The below will download the latest Arch Linux image and use it to run a "Hello World" bash script in the container.

$ docker run -it --rm archlinux bash
Enter fullscreen mode Exit fullscreen mode

Top comments (0)