The first thing you need to do is install Docker and Docker compose if you don’t have them already.
Docker requires a 64-bit operating system running kernel version 3.10 or higher.
Check your current kernel version. Open a terminal and use
uname -rto display your kernel version:
# uname -r
Run the Docker installation script.
# curl -sSL https://get.docker.com/ | sh
Start the Docker service:
For Systemd:$ systemctl start docker
For SysV Init:$ service docker start
If you would like to use Docker as a non-root user, you should now consider adding your user to the
docker group with something like the following command (remember that you’ll have to log out and log back in for this to take effect):
# usermod -aG docker your-user
Docker Compose 1.6 or newer is required. Follow these steps to install it:
Download the Docker Compose binary:
# curl -L "https://github.com/docker/compose/releases/download/1.28.3/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
Grant execution permissions:
# chmod +x /usr/local/bin/docker-compose
If the command docker-compose fails after installation, check your path. You can also create a symbolic link to /usr/bin or any other directory in your path.
sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
Test the installation to ensure everything went properly:
$ docker-compose --version
docker-compose version 1.28.3
If you see
docker-compose: command not foundit means that
/usr/local/binis not in your
PATH, most Linux distributions have
PATHso you can create a symbolic link from
# ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose