Advance

How to Install and Access Docker Desktop on Ubuntu 22.04

How to Install and Access Docker Desktop on Ubuntu 22.04
0
(0)

Docker is a platform for building, running, debugging, and testing container applications. Nowadays, Docker has become a standard tool for software developers and system administrators. Docker is an innovative approach to running applications quickly without affecting the rest of the system. In this article, we are going to teach you How to Install and Access Docker Desktop on Ubuntu 22.04. You can check out the packages offered on the Eldernode website if you would like to purchase an Ubuntu VPS server.

Tutorial Install and Access Docker Desktop on Ubuntu 22.04

Recommended Article: How to install and use vi as a full text editor

What is Docker Desktop?

Docker Desktop is a native open-source desktop application based on the Linux and Windows operating systems that creates a virtual environment. In this virtual environment, you can implement and run various applications. The first version of Docker was released in 2013. Docker is a tool that allows developers to easily develop applications in a sandbox called a container and run them on the host operating system that plays a key role in Docker. With the help of Docker, users can package an application with all its dependencies in a standardized software development unit.

Docker Desktop Features

1- Easy installation of a complete Docker development environment

2- Automatic Updates

3- Fast and reliable performance with native Windows Hyper-V virtualization

4- In-container development and debugging with supported IDEs

5- Ability to switch between Linux and Windows Server environments in Windows to build applications

6- Ability to work natively on Linux via WSL 2 on Windows machines

7- Ability to containerize and share any application on any cloud platform, in multiple languages and frameworks

8- Volume mounting for code and data

Prerequisites to Install Docker Desktop on Ubuntu 22.04

– Support for 64-bit kernel and CPU for virtualization

– KVM virtualization support

– systemd init system

– At least 4 GB of RAM

– Gnome or KDE desktop environment

– New version of QEMU

In the next section, we are going to teach you step by step how to Install Docker Engine on Ubuntu 22.04.

Installing Docker Engine on Ubuntu 22.04

First, you should remove the existing Docker repository using the following command:

sudo apt remove docker docker-engine docker.io 2>/dev/null

And update your system:

sudo apt update  
sudo apt upgrade

Now you need to install the required packages by running the following command:

sudo apt -y install apt-transport-https ca-certificates curl software-properties-common

In this step, run the following command to add the Docker repository:

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/docker-archive-keyring.gpg  
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"

Now you can install Docker on Ubuntu by entering the following command:

sudo apt install docker-ce docker-ce-cli containerd.io uidmap

Then add your user account to the docker group using the following command:

sudo usermod -aG docker $USER  
newgrp docker

How to Install Docker Desktop on Ubuntu 22.04

First, you should remove the existing Docker Desktop:

sudo apt remove docker-desktop

And clean up the system with the following commands:

rm -r $HOME/.docker/desktop  
sudo rm /usr/local/bin/com.docker.cli

To remove the data files, run the following command:

sudo apt purge docker-desktop

You can download the latest Docker Desktop package with the following command:

wget https://desktop.docker.com/linux/main/amd64/docker-desktop-4.9.1-amd64.deb

If you using non-Gnome Desktop environments, install the Gnome-terminal package using the following command:

sudo apt install gnome-terminal

Now it’s time to install Docker Desktop:

sudo apt install ./docker-desktop-*-amd64.deb

Then accept the required dependencies installation to add a new entry in the /etc/hosts for Kubernetes:

....  0 upgraded, 44 newly installed, 0 to remove and 0 not upgraded.  Need to get 35.5 MB/439 MB of archives.  After this operation, 129 MB of additional disk space will be used.  Do you want to continue? [Y/n] y

A new entry will be added in the /etc/hosts as below:

cat /etc/hosts  127.0.0.1 localhost  127.0.1.1 ubuntu    # The following lines are desirable for IPv6 capable hosts  ::1 ip6-localhost ip6-loopback  fe00::0 ip6-localnet  ff00::0 ip6-mcastprefix  ff02::1 ip6-allnodes  ff02::2 ip6-allrouters  # Added by Docker Desktop  # To allow the same kube context to work on the host and the container:  127.0.0.1 kubernetes.docker.internal  # End of section
Recommended Article: Set IP static on Ubuntu 20.04 LTS Server with netplan

How to Access Docker Desktop on Ubuntu 22.04

You can launch Docker Desktop from the application menu or through the terminal. Enter the following command to launch it through the terminal:

systemctl --user start docker-desktop

Now you should see the following page. Check the “I accept the terms” box and click Accept:

 

install and access Docker Desktop on Ubuntu

 

After the Docker Desktop starts, you will see the following home page:

 

install and access Docker Desktop on Ubuntu

 

Now you should check the versions using the following executables:

docker compose version  
docker --version  
docker version

Images and containers of the Docker Desktop are stored in an isolated storage location in the VM. If running Docker Desktop and Docker Engine at the same time results in an error, you can stop the Docker Engine service using the following command:

sudo systemctl stop docker docker.socket containerd

And disable it with the following command:

sudo systemctl disable docker docker.socket containerd

If you want to see the available contexts:

docker context ls

You can use a preferred context by running the following command:

docker context use default

Enter the following command to use the docker-desktop context:

docker context use desktop-linux

How to Configure Docker Desktop on Ubuntu 22.04

Go to the Settings tab and choose the General option:

 

Docker-Desktop-General-settings

 

If you check the “Start Docker Desktop when you log in” box, you can enable Docker Desktop automatically start when you open your session. Also, you can do this using the following command:

systemctl --user enable docker-desktop

If you check the “Send usage statistics” box, reports will be sent to Docker Desktop.

You can see advice messages about the tool by checking the “Show weekly tips” box.

Check the “Open Docker Dashboard at startup” box to display the dashboard on startup.

If you want to enable docker-compose to use Docker Compose V2, check the “Enable Docker Compose V1/V2 compatibility mode” box.

Now choose the Resources option in the Settings tab:

 

Docker-Desktop-Resources-tab

 

In this section, you can limit the resources used by Docker. If you configure File Sharing in Advanced settings, you can share local directories with Linux containers. Click (+) to add a directory and (-) to remove it. Remember to click Apply & Restart after making any changes:

 

Docker-Desktop-File-Sharing

 

The Network section in the Resources tab is useful for network configurations. If the default choice of subnet interferes with something in your system, you can specify custom subnets here:

 

Docker-Desktop-network-configurations

 

That’s it! Docker Desktop was successfully installed on Ubuntu 22.04.

Conclusion

Docker is a software platform that builds and develops Container-based applications. It shares the operating system kernel in isolation. In this article, we introduced you to Docker Desktop and taught you how to install and access it on Ubuntu 22.04. I hope this tutorial was useful for you. If you have any questions, you can contact us in the Comments.

How useful was this post?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate this post.

View More Posts
Marilyn Bisson
Content Writer
Eldernode Writer
We Are Waiting for your valuable comments and you can be sure that it will be answered in the shortest possible time.

Leave a Reply

Your email address will not be published. Required fields are marked *

We are by your side every step of the way

Think about developing your online business; We will protect it compassionately

We are by your side every step of the way

+8595670151

7 days a week, 24 hours a day