This tutorial explains, how to install docker on Ubuntu.
Oct 22, 2018 Step 3: Install Docker on Ubuntu 18.04. Step 4: Start and Automate Docker. Step 5 (Optional): Check Docker Version. Option 2: Install Docker from Official Repository. Step 1: Update Local Database. Step 2: Download Dependencies. Step 3: Add Docker’s GPG Key. Ubuntu Linux 16.04 LTS reached the end of its five-year LTS window on April 30th 2021 and is no longer supported. Docker no longer releases packages for this distribution (including patch- and security releases). Users running Docker on Ubuntu 16.04 are recommended to update their system to a currently supported LTS version of Ubuntu.
Docker is a platform that combines applications and its dependencies in the form of packages called a container. We can run multiple containers on a single Operating System. Containers are not Virtual Machines. Virtual Machines requires Operating System to run applications, but containers do not. As containers don’t need an Operating System, it takes very little time to start and hence it is very faster than Virtual Machines.
Read About: How to Install Docker on Windows
Sep 08, 2020 sudo apt update Step 2: Uninstalling Old Docker Versions. Before installing the software, make sure you remove any old Docker packages on your Ubuntu 20.04 by running the command: sudo apt-get remove docker docker-engine docker.io Step 3: Installing Docker. Now let’s install Docker on Ubuntu 20.04. Run the following command in the terminal. Jan 24, 2021 apt-get update -y Step 3 – Install Docker Ubuntu. Once the repository is updated, you can install the Docker on Ubuntu by running the following command. $ docker-compose -version docker-compose version: 1.4.0 And $ docker -version Docker version 1.11.1, build 5604cbe When I try to update it, I get the following: $ sudo apt-get upgrade docker-engine Reading package lists. Done Building dependency tree Reading state information.
&& How to install Ansible on Ubuntu
Install Docker on Ubuntu
Step 1- Update your Ubuntu Linux Box.
$ sudo apt-get update -y
Step 2 – Download and run a get-docker.sh script to install docker.
$ curl -fsSL https://get.docker.com -o get-docker.sh
$ sudo sh get-docker.sh
or you can Download and run Test Script.
Download and run testing version, download and install test-docker.sh script using the following commands.
$ curl -fsSL https://get.docker.com -o test-docker.sh
$ sudo sh test-docker.sh
Step 3- Add a user to the Docker group.
If you would like to use Docker with a non-root user, using the following command.
Add a new user docker-user and set a password
$ sudo useradd docker-user
$ sudo passwd docker-user
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Add docker-user to Docker group
$ sudo usermod -aG docker docker-user
Step 4 – Check Docker Version
Check Docker Version using the following command
$ docker – -version
Docker version 19.03.8, build afacb8b7f0
Uninstall Docker on Ubuntu
Use the following command to uninstall docker completely, including Docker Engine, CLI and Containerd Package
$ sudo apt-get purge docker-ce docker-ce-cli containerd.io -y
Also delete all Docker Images, Containers, and Volumes that not automatically remove.
$ sudo rm -rf /var/lib/docker
Note: If you install docker using the script, you should update the docker using the package manager only. Don’t re-run docker script, as it can cause issues if it attempts to re-add repositories.
I hope you enjoyed this tutorial and learned about “How to install Docker on Ubuntu using Script”. If you think this is really helpful, please do share this article with others as well. Please also share your valuable feedback, comment, or any query in the comment box. I will really happy to resolve your all queries any.
Update Docker In Ubuntu Linux
If you think we helped you or just want to support us, please consider these:-
Update Docker Compose In Ubuntu
Connect to us: FacebookTwitter