Skip to content

Instantly share code, notes, and snippets.

Last active May 13, 2018 21:27
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Install Docker CE on RHEL/Centos (e.g. in a BBC VM)
# upgrade centos and make sure you have the docker repo
sudo yum install -y yum-utils
sudo yum-config-manager --add-repo
# dunno why I had to do this but I did...any ideas?
sudo yum makecache fast
# Install these dependencies
sudo yum install -y
sudo yum install -y
# Install docker-ce
sudo yum install -y docker-ce
# Start the daemon
sudo service docker start
# Add current user to the docker group
sudo usermod -a -G docker $USER
#NOTE : you'll need to do this for every user who needs to use docker...
# You may need to login to pull repos
sudo docker login
# Try it out
docker run hello-world
# Behind a proxy?
# Do this:
sudo mkdir -p /etc/systemd/system/docker.service.d
sudo vim /etc/systemd/system/docker.service.d/http-proxy.conf
# Add this:
#need an HTTPS proxy?
sudo vim /etc/systemd/system/docker.service.d/https-proxy.conf
#add this:
# Reload the daemon to grab the new configs
sudo systemctl daemon-reload
# Restart docker (is this necessary after restarting the daemon?)
sudo systemctl restart docker
# Verify the configs are correct
systemctl show --property=Environment docker
# Now you should be able to grab whatever images you need.
# Have fun :)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment