Install Docker on Ubuntu


Docker
 is an increasingly popular software package that creates a container for application development.

Developing in Docker speeds up applications, as it shares the kernel and other resources, instead of requiring dedicated server resources.

There are two versions of Docker – Docker CE (Community Edition) and Docker EE (Enterprise Edition). If you have a small-scale project, or you’re just learning, you will want to use Docker CE.

In this tutorial, we will show you how to install Docker on Ubuntu 18.04.

install docker on ubuntu 18.04

Prerequisites

  • Ubuntu 18.04 64-bit operating system
  • A user account with sudo privileges
  • Command-line/terminal (CTRL-ALT-T or Applications menu > Accessories > Terminal)
  • Docker software repositories (optional)

Outlet Dedicated Servers Starting at Only $30.00/mo


Install Docker on Ubuntu Using Default Repositories

Step 1: Update Software Repositories

It’s a good idea to update the local database of software to make sure you’ve got access to the latest revisions.

Open a terminal window and type:

sudo apt-get update

Allow the operation to complete.

Step 2: Uninstall Old Versions of Docker

Next, it’s recommended to uninstall any old Docker software before proceeding.

Use the command:

sudo apt-get remove docker docker-engine docker.io

Step 3: Install Docker

To install Docker on Ubuntu, in the terminal window enter the command:

sudo apt install docker.io

Step 4: Start and Automate Docker

The Docker service needs to be setup to run at startup. To do so, type in each command followed by enter:

sudo systemctl start docker
sudo systemctl enable docker

enable docker command, in terminal

Step 5 (Optional): Check Docker Version

To verify the installed Docker version number, enter:

docker --version

留言

此網誌的熱門文章

Making a Windows 11 hotspot without an internet connection