Installing Docker in docker-container running Ubuntu 20.04

Step #1.) Let’s first check, which version of Ubuntu right now we have :-

cat /etc/lsb-release

Step #2.) Next, let’s update with following commands :-

sudo apt-get update

sudo apt-get install \
ca-certificates \
curl \
gnupg \
lsb-release

Step #3.) Next, add Docker’s official GPG key:

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

Step #4.) Next, use the following command to set up the stable repository. To add the nightly or test repository, add the word nightly or test (or both) after the word stable in the commands below. Learn about nightly and test channels.

echo \
"deb [arch=$(dpkg --print-architecture) 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

Step #4.) Next, Install Docker Engine. Update the apt package index, and install the latest version of Docker Engine and containerd :-

sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io \

Step #6.) Next, test the docker version :-

docker --version

That’s all in this section. If you liked reading this blog, kindly do press on clap button multiple times, to indicate your appreciation. We would see you in next series.

References :-

--

--

--

Software Engineer for Big Data distributed systems

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

A simple example of using Spark in Databricks with Python and PySpark.

Contributing to MMLib.SwaggerForOcelot library for gateway itself documentation

Istio Security part 2 — Authorization

Tensor and TensorFlow

Tutorial Fuzzy Logic Mamdani for Arduino

Tutorial Fuzzy Logic Mamdani for Arduino

Unknown Domain Preventing Users Tutorial Access

RenoLink V1.94

Testing is a Temperament! Why to follow me?

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
aditya goel

aditya goel

Software Engineer for Big Data distributed systems

More from Medium

Setup Nginx, Docker, and Portainer on VPS

How to create a SSH-enabled docker image on WSL2

Sneak view into Docker for devs| Part-2

DOCKER — GETTING STARTED