Install docker and docker compose on centos7

Source: Internet
Author: User
Tags docker compose

1. First Delete the old installed version of docker, if any.

$ sudo yum remove docker                   docker-client                   docker-client-latest                   docker-common                   docker-latest                   docker-latest-logrotate                   docker-logrotate                   docker-selinux                   docker-engine-selinux                   docker-engine

2. Use repository to install docker CE

$ sudo yum install -y yum-utils   device-mapper-persistent-data   lvm2
$ sudo yum-config-manager     --add-repo     https://download.docker.com/linux/centos/docker-ce.repo
$ Sudo Yum install docker-ce
To install the specified version of docker-ce, run the following command to view the version number.
$ yum list docker-ce --showduplicates | sort -r
$ Sudo Yum install docker-Ce-<version string> # example: docker-ce-18.03.0.ce

3. Install docker-compose

curl -L https://github.com/docker/compose/releases/download/1.23.0-rc3/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-composechmod +x /usr/local/bin/docker-compose

The above installation is the latest version of compose, you can go to GitHub to find https://github.com/docker/compose/releases

4. Uninstall docker-ce

$ sudo yum remove docker-ce$ sudo rm -rf /var/lib/docker

5. Uninstall docker-compse

sudo rm /usr/local/bin/docker-compose

 

Install docker and docker compose on centos7

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.