Install Ubuntu 22.04 LTS Container On Docker

Install Ubuntu 22.04 LTS Container On Docker

Ubuntu 22.04 LTS is the latest long-term version from Ubuntu. Ubuntu 22.04 Jammy Jellyfish LTS will be supported till April 2027. In this tutorial post, we are going to show you the easy way to install Ubuntu 22.04 LTS container on Docker.

Install Ubuntu 22.04 LTS Container On Docker

If you don’t have Docker on your current system then first install the same. As per your operating system you can go for the tutorials given below. Whereas those who already have Docker installed, can skip and move to the next step.

You need to install the following packages before installing Docker on Ubuntu 22.04 LTS.

sudo apt install apt-transport-https curl lsb-release

Now, add the Docker GPG key on Ubuntu 22.04 LTS with the following command:

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg

Run the following command to add Docker repo on Ubuntu 22.04 LTS:

echo \
"deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

Now, update your Ubuntu 22.04 LTS:

sudo apt update

Finally, It’s time to install Docker on Ubuntu 22.04 LTS with the following command:

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

Let’s focus on the process of installing Ubuntu 22.04 LTS on Docker. At first,  download the latest image of Ubuntu 22.04 available in the docker’s library.

docker pull ubuntu:jammy-20220101

After pulling the Ubuntu 22.04 LTS available in the docker, it’s time to run the command to create Ubuntu 22.04 LTS container.

docker create -it --name jammycontainer ubuntu:jammy-20220101

Now, start the container that you created with the above command:

docker start jammycontainer

The container has been started successfully in the background. Now you need to attach the container to your current session so that you can perform command-line functions.

docker attach jammycontainer

This much for now. This is the Ubuntu 22.04 LTS Jammy Jellyfish tutorial post. Today we talked about the process to install Ubuntu 22.04 LTS Jammy Jellyfish container on Docker. Please let us know if there is any error or mistakes in this post.

READ More Relevant Stuff:  Ubuntu Cinnamon Remix Is Now Official Ubuntu Flavor

 

Comments

No comments yet. Why don’t you start the discussion?

    Leave a Reply

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