Docker Ubuntu Server 18.04



  1. Ubuntu Server 18.04 Docker-ce
  2. Instalar Docker Ubuntu Server 18.04

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

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

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

Install Docker Compose from Ubuntu's repository

If you are running an Ubuntu server, you might be wondering about upgrading to Ubuntu 20.04 LTS server. In this tutorial, I’ll show you the steps to upgrade Ubuntu server version from 18.04 to 20.04 LTS. Upgrading to Ubuntu 20.04 LTS server from 18.04. Before you go on upgrading your server, you should keep a few thing in mind. 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. Older versions of Docker were called docker, docker.io, or docker-engine. If these are installed, uninstall them.

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:

Ubuntu Server 18.04 Docker-ce

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

Server

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:

Instalar Docker Ubuntu Server 18.04

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.

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:

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
Become a member to get the regular Linux newsletter (2-4 times a month) and access member-only contents.

Join the conversation.

This step by step guide shows how to upgrade Ubuntu 18.04 LTS server to 20.04 LTS over an SSH connection or otherwise.

Ubuntu 20.04 LTS is released with new kernel and new features. If you are running an Ubuntu server, you might be wondering about upgrading to Ubuntu 20.04 LTS server.

In this tutorial, I’ll show you the steps to upgrade Ubuntu server version from 18.04 to 20.04 LTS.

Upgrading to Ubuntu 20.04 LTS server from 18.04

Before you go on upgrading your server, you should keep a few thing in mind.

The server upgrade process may take half an hour or more and this will result in downtime. If you are running a web service like WordPress or some other public facing service, be prepared for your services to be offline for some time.

This is why you should only upgrade to the new version when it is really critical.

Second thing is to make a backup of your server. I use Linode cloud platform for my servers and creating a backup of the entire server image is just a matter of a few clicks.

With that in mind, let’s see how to upgrade to Ubuntu 20.04 server.

I am using root for running the commands. If you are not logged in as root, you should have sudo rights and run these commands with sudo.

Step 1: Update your system

Log in to your Ubuntu server. If you it’s a remote system, use SSH to log in. I mean you already know how to access your server, right?

Update your Ubuntu server first for any pending software update:

Step 2: Configure Update Manager

Ubuntu provides a crucial tool called Update Manager for upgrading your system to a newer version.

Normally, it should already be installed but do verify that your Ubuntu server has update manager tool installed:

Next, you should check the content of the /etc/update-manager/release-upgrades file and make sure that the last line is Prompt=lts and it is not commented out.

This means that your Ubuntu system will be updated to a new stable LTS version. It looks something like this:

Step 3: Upgrade Ubuntu server to a new LTS version

Once you have made sure of that, you can upgrade your Ubuntu 18.04 server to Ubuntu 20.04 LTS with this command:

You may see a message like this that says it cannot find a new version to upgrade to.

Checking for a new Ubuntu release
There is no development version of an LTS available.
To upgrade to the latest non-LTS develoment release
set Prompt=normal in /etc/update-manager/release-upgrades.

If you do, you can force the upgrade with -d option like this:

The -d option forces to look for development release which is 20.04 at present.

The rest of the procedure is basically pressing enter to what it demands.

Upgrading Ubuntu server over SSH connection? Pay attention!

If you are using SSH to log in to your system, you should see a warning message like this:

This session appears to be running under ssh. It is not recommended to perform a upgrade over ssh currently because in case of failure it is harder to recover.

See, the version upgrade procedure needs your input at several steps. If you are doing it over SSH and your connection gets disconnect, what happens to the upgrade? Will it hang? How will it receive the critical user input to proceed with the upgrade?

Don’t worry. Ubuntu is intelligent. The do-release-upgrade tool takes care of this. It automatically opens a new ssh session at port 1022 with screen. If you have custom firewall, you must open the port 1022.

If you get disconnected from the server in the middle of the upgrade, you can reconnect and recover the session by connecting to your server through ssh but at port 1022 like this:

If you don’t see the upgrade procedure running, use the screen command like this:

Follow the on screen instructions and you should be upgraded to the new server in around 20-30 minutes (or even less).

I noticed that it took considerable time at the step where it upgrades LXD. I almost thought that my SSH connection hanged.

Docker Ubuntu Server 18.04

And if you screens like the one above where you have to make a choice, press tab to switch between the choices and enter to confirm your input.

After the upgrade completes, you have to restart your Ubuntu server. You can verify that you are using Ubuntu 20.04 with lsb_release -a command:

I hope you liked this quick little tutorial helpful in upgrading to Ubuntu 20.04 LTS server.

Have questions? Please feel free to ask.

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

Join the conversation.