Skip to content

Instantly share code, notes, and snippets.

@kesor
Last active May 25, 2020 16:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kesor/eaa94379d8e851697baa7fbf839f0a69 to your computer and use it in GitHub Desktop.
Save kesor/eaa94379d8e851697baa7fbf839f0a69 to your computer and use it in GitHub Desktop.
install docker-cli on centos/amazon-linux
## 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