Skip to content

Instantly share code, notes, and snippets.

@phuctm97
Last active September 19, 2019 15:48
Show Gist options
  • Save phuctm97/6d09916e8eec59b6fb6d7f5ae14c3985 to your computer and use it in GitHub Desktop.
Save phuctm97/6d09916e8eec59b6fb6d7f5ae14c3985 to your computer and use it in GitHub Desktop.
Install Docker CE on RHEL 7
#!/bin/bash
# Install required packages.
sudo yum install -y yum-utils \
device-mapper-persistent-data \
lvm2
# Install container-selinux.
# Check for latest version: http://mirror.centos.org/centos/7/extras/x86_64/Packages/.
sudo yum install -y \
http://mirror.centos.org/centos/7/extras/x86_64/Packages/container-selinux-2.107-3.el7.noarch.rpm
# Set up Docker repository.
sudo yum-config-manager \
--add-repo \
https://download.docker.com/linux/centos/docker-ce.repo
# Install Docker CE and tools.
sudo yum install -y \
docker-ce \
docker-ce-cli \
containerd.io
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment