Install docker and docker-compose on ubuntu 18.04, the pro-test is effective

One, ubuntu 18.04 install docker

Simple installation

sudo apt install docker.io

Configure docker to start automatically

sudo systemctl start docker
sudo systemctl enable docker

Check if the installation is successful

$ docker -v
Docker version 19.03.6, build 369ce74a3c

View docker service status

sudo systemctl status docker

Two, ubuntu 18.04 install docker-compose

Download the docker-compose file

curl -L https://get.daocloud.io/docker/compose/releases/download/1.27.4/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose

Add executable permissions (the installation is completed in only one step). If you do not add executable permissions, executing the docker-compose command will prompt you that the permissions are insufficient.

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

View docker-compose version

docker-compose  --version

ps: The version number of docker-compose can be changed. Visit the resource library to check the version update progress.

Guess you like

Origin blog.csdn.net/qq_43314560/article/details/114262392