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 :-
- https://docs.docker.com/engine/install/ubuntu/
- https://adityagoel123.medium.com/installing-aws-cli-sam-cli-inside-docker-ef91ceb4e250
- https://adityagoel123.medium.com/installing-aws-cli-sam-cli-inside-docker-ef91ceb4e250
- https://adityagoel123.medium.com/docker-for-devs-with-hands-on-part-4-b45848af2d8a
- https://adityagoel123.medium.com/sneak-view-into-docker-for-java-devs-part-1-b0388ecd5974
- https://adityagoel123.medium.com/sneak-view-into-docker-for-web-devs-part-2-eac68e3226
- https://adityagoel123.medium.com/sneak-view-into-docker-for-web-devs-45b4d1aff63