Skip to content

Instantly share code, notes, and snippets.

@nurdiansyah
Created January 15, 2020 03:05
Show Gist options
  • Save nurdiansyah/3d123f85ebbca9bb4f891ebd8d30d8dc to your computer and use it in GitHub Desktop.
Save nurdiansyah/3d123f85ebbca9bb4f891ebd8d30d8dc to your computer and use it in GitHub Desktop.
yum install -y yum-utils device-mapper-persistent-data lvm2
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
yum makecache fast
yum install -y docker-ce
chkconfig docker on
service docker start
## config firewall
# trust the docker interface
firewall-cmd --permanent --zone=trusted --change-interface=docker0
# accept IPv4 traffic
firewall-cmd --permanent --direct --add-rule ipv4 filter INPUT 4 -i docker0 -j ACCEPT
# any ports on the host you want to access from the containers (strapi port 1337 here)
firewall-cmd --permanent --zone=trusted --add-port=1337/tcp
firewall-cmd --reload
service docker restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment