Skip to main content

How To Install Docker Compose on Ubuntu 18.04



Image result for docker logo



Introduction

Docker is a great tool for automating the deployment of Linux applications inside software containers, but to take full advantage of its potential each component of an application should run in its own individual container. For complex applications with a lot of components, orchestrating all the containers to start up, communicate, and shut down together can quickly become unwieldy.
The Docker community came up with a popular solution called Fig, which allowed you to use a single YAML file to orchestrate all your Docker containers and configurations. This became so popular that the Docker team decided to make Docker Compose based on the Fig source, which is now deprecated. Docker Compose makes it easier for users to orchestrate the processes of Docker containers, including starting up, shutting down, and setting up intra-container linking and volumes.
In this tutorial, we’ll show you how to install the latest version of Docker Compose to help you manage multi-container applications.

Prerequisites

To follow this article, you will need an Ubuntu 18.04 server with the following:
Once these are in place, you’re ready to follow along.
Note: Even though the Prerequisites give instructions for installing Docker on Ubuntu 18.04, the docker commands in this article should work on other operating systems as long as Docker is installed.

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 --version
This 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.



Credit : https://www.digitalocean.com/community/tutorials/how-to-install-docker-compose-on-ubuntu-18-04


This is for personal documentation purposes.





Comments

Popular posts from this blog

Reset 120 day RDS Grace period on 2016 and 2019

  Reset 120 day RDS Grace period on 2016 and 2019 Enter the following command to check Grace Period: wmic /namespace:\\root\CIMV2\TerminalServices PATH Win32_TerminalServiceSetting WHERE (__CLASS !=””) CALL GetGracePeriodDays  Confirm-deletion-of-the-timebomb-key-in-the-registry If you have a home lab environment or another lab where you continually test various solutions, licensing, and trial expiration is a challenge that you constantly tend to run into. It is just part of the fun of lab environments. While most trials are fairly “hard and fast” and don’t allow you to reset the trial expiration, if you work with Microsoft Windows Server and Remote Desktop Services (RDS), there is a “hack” that allows you to effectively reset the expiration of  Remote Desktop  Services grace period where you can essentially rewind the clock on your RDS licensing if you are making use of this role inside your lab environment. I am using Windows Server 2019 for my Windows workloads in...

Remote Desktop Services session timeout Setup in RD Session Host in Windows Servers

  If you face a session time-limit policy issue that gets disconnected in the meantime. You can follow the steps below in order to fix the issue, By default, the user’s RDP session in Windows may stay disconnected until the user or administrator terminates, or the computer is restarted. However, it is quite convenient since a user may connect to his old RDP session and go on working with running programs. In order to terminate disconnected RDP/RDS sessions automatically in a specified time period, you need to set session limits (time-outs) correctly. If you are using an RDS server, you will have to configure session time-out parameters from the RDS collection settings in the Session tab menu. You will have to Specify the time period after which you want to disconnect the RDP session. Lastly, a disconnected session option (by default, a session period is unlimited – Never). Thus, you can set the maximum duration of an active session (Active session limit) and end an idle session (Id...

Add Printer: Windows cannot connect to the printer. FIXED!

  Fix Windows Cannot Connect to the Printer Issue. Easily! 1. Search "Registry Editor" 2. Locate Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print and right-click select  New > Key  >  "DWORD (32-bit) Value" 3. Rename the file to  RpcAuthnLevelPrivacyEnabled 4. Right Click select " Modify..." 5. Make sure the Value name is correct " RpcAuthnLevelPrivacyEnabled" Value Data is 0  and the Base is Hexadecimal and click  OK . And now follow the steps below to stop the Print Spooler service  and then start it again. 1. Press Win+R (Windows logo key and R key) at the same time. A Run dialog box will open. Type services.msc in the run box and click OK button. 2. In the Name list, locate and double-click on services  Print Spooler . 3. Click Restart. Congratulations!