Last active
May 25, 2020 16:29
-
-
Save kesor/eaa94379d8e851697baa7fbf839f0a69 to your computer and use it in GitHub Desktop.
install docker-cli on centos/amazon-linux
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## optional: run the amazon cli container | |
docker run -ti --rm --name amazon-cli \ | |
-v ~/.aws:/root/.aws \ | |
-v ~/.docker:/root/.docker \ | |
-v /var/run/docker.sock:/var/run/docker.sock \ | |
--entrypoint /bin/bash \ | |
amazon/aws-cli | |
## (slow) optional: generate yum repository configuration using an additional tool | |
yum install yum-utils -y | |
yum-config-manager \ | |
--add-repo \ | |
https://download.docker.com/linux/centos/docker-ce.repo | |
## (fast) generate yum repo info by pasting text into a file | |
curl -so /etc/yum.repos.d/docker-ce.repo \ | |
https://download.docker.com/linux/centos/docker-ce.repo | |
## install docker-ce-cli | |
yum --enablerepo=docker-ce-stable --disablerepo=amzn2-core install docker-ce-cli -y |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment