NEW! Mirantis Academy -   Learn confidently with expert guidance and On-demand content.   Learn More

COOKBOOK HOME

Kubernetes Lab

Install Docker – Open Source Instructions

Here's the quickest way to install Docker on Ubuntu -- required for most container dev and many Kubernetes projects

You need open source Docker to build containers in the standard way and store their images in accessible repositories. This is a foundational part of building apps to run on Kubernetes.

Happily, it’s easy to install open source Docker engine and CLI on any modern Linux. We’ll use Ubuntu desktop as an example, and use snap.

Step 1: Use snap to install Docker

sudo snap install docker

Step 2: Make your user a member of the docker group

It then often makes sense to make your administrative user part of the Docker group, so they can call the Docker CLI without using sudo:

sudo usermod -aG docker $USER

Step 3: Reload group settings

Then you can reload settings for the docker group, making this effective:

newgrp docker

Step 4: Test

Now you can test to see if Docker is working and without sudo.

docker run hello-world

If all is well, this will run a test container that prints a message and exits.