How To Install Docker on Ubuntu 18.04?

Docker is a container-based tool used to create, deploy, and run the applications by using containers. It is very easy to move the Docker container to remote location without making any changes to your application. Following are the steps to install Docker on Ubuntu 18.04 LTS.

  1. You should remove any existing Docker packages. Run the below command to uninstall it.

    # sudo apt-get purge docker lxc-docker docker-engine docker.io
    
  2. Run Below Command to install required Docker Packages on your system.

    # sudo apt-get install  curl  apt-transport-https ca-certificates software-properties-common
  3. Now, Execute below command. It will import Dockers official GPG key to verify packages signature before install with apt-get.

    # curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add 
  4. Let us install Docker repository on the Ubuntu system which includes Docker packages with its dependencies.

    # sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
    
  5. Run update command and install Docker on Ubuntu.

    # sudo apt-get update
    # sudo apt-get install docker-ce
  6. Docker service should start automatically. You can verify the status using the below command.

    # sudo systemctl status docker
    

If the service is showing started, your Docker installation is successful.

Related Articles

How to set up a cron to take MySQL Database Backup daily and remove the older backup files that are older than 10 days?

Login to your Linux server using ssh. Open your crontab using the below command Crontab -e...

How to redirect http to https using .htaccess?

If you have installed SSL Certificate on your website and want to redirect your website traffic...

bash: netstat: command not found.

You may face the below error on your Linux OS if you haven’t installed the netstat command...

How to find all files/folders with 777 permission in Linux?

First of all, let us understand the meaning of 777 file permission in Linux. Suppose, any of the...

How to install CentOS Web Panel on CentOS 7.x

This article will guide you on how to install CentOS Web Panel on CentOS 7.xCentOS web panel is...

  • 0 Users Found This Useful

Was this answer helpful?