Installing Docker on a Server
This section explains how to install Docker and docker-compose on a server.
The guide starts from the assumption that you have set up a server, and you are connected to the server through ssh.
Root privileges are needed to install Docker, so before executing the commands below, make sure you are logged in as root, using
Installing Docker
Docker provide an official script to install docker
that works on most systems. The official script can be run with
Once the command has finished and if it looks successful, you can check whether the Docker was installed correctly with
which gave me the output of
Installing docker-compose
The easiest way to install docker-compose is with
If it looks like the command ran successfully, you can check the version with
which should give an output similar to
Awesome.
Summary
If the outputs of docker --version
and docker-compose --version
looked similar to the example output above (don't worry about exact version numbers), then your Docker installation should be set up correctly and ready to go.
Last updated