Ubuntu 18 Docker Install



Docker Compose is a Python program that lets you easily deploy multiple containers on a server.

Ubuntu 18 04 Install Docker

If you need a complete Docker installation for Ubuntu, there is a guide on devconnected about it. Before moving to the next section, make sure that you have the latest version of Docker running. $ docker -version Docker version 19.03.1, build 74b1e89. Now that your Docker is ready, let’s install the Prometheus container. Docker is a software package that creates containers for application development. Learn how to Install Docker on Ubuntu 18.04 in this tutorial. To install Docker Engine, you need the 64-bit version of one of these Ubuntu versions: Ubuntu Groovy 20.10; Ubuntu Focal 20.04 (LTS) Ubuntu Bionic 18.04 (LTS) Ubuntu Xenial 16.04 (LTS) Docker Engine is supported on x8664 (or amd64), armhf, and arm64 architectures. Uninstall old versions. Now let’s install Docker on Ubuntu 20.04. Run the following command in the terminal window: sudo apt install docker.io. Type y and hit Enter to confirm the installation. Once the install is completed, the output notifies you Docker has been installed.

As you start exploring Docker, you'll learn that often to run a certain web-app, you'll need to run various services (like database, web-server etc) in different containers.

Deploying multiple containers is a lot easier with Docker Compose.

In this tutorial, you'll learn two ways of installing Docker Compose on Ubuntu:

  • Installing Docker Compose from Ubuntu's repository: Easier method but may not have the latest version of docker compose
  • Installing the latest Docker Compose using PIP: Gets you the newer docker compose version
Ubuntu 18 Docker Install

Keep in mind that to use Docker Compose, you must have Docker installed on Ubuntu.

Install Docker Compose from Ubuntu's repository

Docker

This is the easiest and recommend method. Unless you need the latest Docker Compose version for some specific reasons, you can manage very well with the docker compose version provides by Ubuntu.

Docker Compose is available in the universe repository of Ubuntu 20.04 and 18.04 so make sure to enable it first:

You probably won't need it but no harm in updating the local cache:

Now you can install Docker Compose in Ubuntu using this command:

You can check that Docker Compose is installed successfully by checking its version:

It should show an output like this:

Install the latest Docker Compose on Ubuntu using PIP

PIP stands for 'PIP Installs Package'. It's a command-line based package manager for installing Python applications.

Install Nvidia Docker Ubuntu 18

Since Docker Compose is basically a Python program, you can use PIP to install it.

But before you do that, you need to install PIP on Ubuntu first.

Enable the universe repository first.

Install PIP now:

Now that you have PIP installed use it to install Docker Compose for all users on your Linux system:

Ubuntu 18 install docker ce

Check the Docker Compose version to ensure that it is installed successfully:

You can see that Docker Compose installed via PIP is more recent version.

I hope you were able to successfully install Docker Compose on Ubuntu with this tutorial. Questions and suggestions are welcome.

Become a Member for FREE
Ubuntu 18 Docker Install
Become a member to get the regular Linux newsletter (2-4 times a month) and access member-only contents.

Join the conversation.