Docker Compose Install

Install and Configure Docker Compose for Ubuntu. This guide assumes, that Docker is already installed in your system.
Compose is a tool for defining and running multi-container Docker applications. We can use Compose to create and start all services with one command from a single configuration YAML file.
It is a great tool to have a minimal orchestration of Docker containers, without adding the complexity that other tools have, like Kubernetes and Docker Swarm.
Installation
Prerequisites
To install Docker Compose you need to make sure you have Docker Engine installed, follow the previous guide on Installing Docker on Ubuntu, to continue with this guide.
Install Compose
Run this command to download the current stable release of Docker Compose:
Apply executable permissions to the binary:
Post-installation
Command-line completion
Compose comes with command completion for the bash and zsh shell. We will show how to enable for both bash and zsh.
Bash
Place the completion script in /etc/bash_completion.d/
:
Reload your settings in your current terminal with:
Zsh
Make sure you have installed oh-my-zsh on your computer. You can follow the ZSH configuration guide in order to do that.
Add docker
and docker-compose
to the plugins list in ~/.zshrc
to run autocompletion within the oh-my-zsh shell:
Reload your settings in your current terminal with:
For shell completion without oh-my-zsh, follow the official docker guide.