How To Install Docker Compose on Ubuntu 19.04

Cpanel/Whm License $3/mo Plesk License $10/mo Cloudlinux License $5/mo

Step 1 — Installing Docker Compose
Although we can install Docker Compose from the official Ubuntu repositories, it is several minor version behind the latest release, so we’ll install Docker Compose from the Docker’s GitHub repository. The command below is slightly different than the one you’ll find on the Releases page. By using the -o flag to specify the output file first rather than redirecting the output, this syntax avoids running into a permission denied error caused when using sudo.

We’ll check the current release and if necessary, update it in the command below:

sudo curl -L https://github.com/docker/compose/releases/download/1.21.2/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose

Next we’ll set the permissions:

sudo chmod +x /usr/local/bin/docker-compose

Then we’ll verify that the installation was successful by checking the version:

docker-compose --versionThis will print out the version we installed:

Output :

docker-compose version 1.21.2, build a133471

Now that we have Docker Compose installed, we’re ready to run a “Hello World” example.

Step 2 — Running a Container with Docker Compose

The public Docker registry, Docker Hub, includes a Hello World image for demonstration and testing. It illustrates the minimal configuration required to run a container using Docker Compose: a YAML file that calls a single image:

First, we’ll create a directory for the YAML file and move into it:

mkdir hello-world
cd hello-worldThen, we’ll create the YAML file:

How to Install Docker on Ubuntu 19.04 “Disco”

Related posts

Arizona Bitcoin Trader Charged With Money Laundering

SXI ADMIN

I Want the Truth: Could Blockchain Stop Online News Distortion?

SXI ADMIN

Bitcoin Price Surges to One-Month High as Tech Outlook Improves

SXI ADMIN

A Network Analyst’s View of the Block Chain

SXI ADMIN

$100k Bail for Suspected Head of Bitcoin Exchange Coin.mx

SXI ADMIN

When the Tide Goes Out: Big Questions for Crypto in 2019

SXI ADMIN

How to Install Webmin on RHEL 8 / CentOS 8

SXI ADMIN

Bitcoin’s Price is Inching Back Up Toward its 2016 High

SXI ADMIN

At Ethereal Summit, A Human Face On A Blockchain Future

SXI ADMIN

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More