Install Docker, Docker Compose on Linux

Install Docker on Linux


Docker's  installation resource files  are stored in Amazon S3, and the connection fails intermittently. So when installing Docker, it will be slower. 
You can quickly install Docker by executing the following command.

curl -sSL https://get.daocloud.io/docker | sh

Applicable to most Linux such as Ubuntu, Debian, Centos, etc. It will synchronize Docker official resources every 3 hours

Install the trial or beta version to experience the latest Docker.

curl -sSL https://get.daocloud.io/docker-experimental | sh
curl -sSL https://get.daocloud.io/docker-test | sh

If the installation is unsuccessful, you can choose to use the binary package installation method. Download binary package

Uninstall Docker


sudo apt-get remove docker docker-engine

After uninstalling Docker, the original Docker image, network, storage volume and other files will be kept in the /var/lib/docker/ directory. If you need to install Docker, you need to delete the /var/lib/docker/ directory

rm -fr /var/lib/docker/

Install Docker Compose


Docker Compose  is stored on Git Hub and is not very stable. 
You can also install Docker Compose at high speed by executing the following command.

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

You can customize the version you need by modifying the version in the URL.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326112457&siteId=291194637
Recommended