DEV Community

Yuil Tripathee
Yuil Tripathee

Posted on

Docker setup in Linux: Setting up docker in Zorin 16.3

As Zorin 16.3 is based on Ubuntu/focal, there's a little workaround to have a usable docker setup.

Process

#1 Install Docker system

As you need to create containers, you need docker to do so. Here's simple process just cited from multiple references.

# preliminaries sudo apt-get update sudo apt-get install ca-certificates curl gnupg 
Enter fullscreen mode Exit fullscreen mode

Need to add keyrings:

# keyrings sudo install -m 0755 -d /etc/apt/keyrings curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg — dearmor -o /etc/apt/keyrings/docker.gpg sudo chmod a+r /etc/apt/keyrings/docker.gpg 
Enter fullscreen mode Exit fullscreen mode

Adding apt source next:

echo \ “deb [arch="$(dpkg — print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \ "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \ sudo tee /etc/apt/sources.list.d/docker.list > /dev/null 
Enter fullscreen mode Exit fullscreen mode

I recommend this step to be done manually if you happen to face any issue. You should shoud be able to have contents as in below in the /etc/apt/sources.list.d/docker.list file. I've manually written this after running into a little issue which works like a charm now.

deb [arch=amd64 signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu focal stable 
Enter fullscreen mode Exit fullscreen mode

After that its just installing stuffs:

# installation just starts now sudo apt-get update sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin 
Enter fullscreen mode Exit fullscreen mode

Finally, testing step is as an usual hello-world container.

sudo docker run hello-world 
Enter fullscreen mode Exit fullscreen mode

Now, you're good to go if you see welcome message running down this hello-world container. Go through this link if you've been facing issues with APT repository. [3]

#2 Docker Desktop

A GUI makes it easy to navigate through the whole docker system. Have a look here to setup docker desktop after installation of docker system. Here's the summary: [2]

# if don't exist sudo apt install gnome-terminal # removing previous installations sudo apt remove docker-desktop rm -r $HOME/.docker/desktop sudo rm /usr/local/bin/com.docker.cli sudo apt purge docker-desktop # install by apt after downloading from the page sudo apt-get update sudo apt-get install ./docker-desktop-<version>-<arch>.deb # launch systemctl --user start docker-desktop 
Enter fullscreen mode Exit fullscreen mode

Next time if you want to upgrade the application, its quite easy:

sudo apt-get install ./docker-desktop-<version>-<arch>.deb 
Enter fullscreen mode Exit fullscreen mode

Check the whole installation as below:

docker compose version Docker Compose version v2.17.3 docker --version Docker version 23.0.5, build bc4487a docker version Client: Docker Engine - Community Cloud integration: v1.0.31 Version: 23.0.5 API version: 1.42 <...> 
Enter fullscreen mode Exit fullscreen mode

#3 Optional: Install kubernetes

As you've installed docker desktop, you can do this installation from the GUI settings in the app quite easily.

References

  1. https://medium.com/@mahmud0x/setting-up-docker-on-zorin-os-16-3-4892bfb18732
  2. https://docs.docker.com/desktop/install/ubuntu/
  3. https://stackoverflow.com/questions/66374226/e-malformed-entry-1-in-list-file-etc-apt-sources-list-d-docker-list-component

Top comments (0)