Skip to content

Instantly share code, notes, and snippets.

@riga
Last active November 29, 2020 21:54
Show Gist options
  • Save riga/8435d647c040cadfbfc8053286b2468d to your computer and use it in GitHub Desktop.
Save riga/8435d647c040cadfbfc8053286b2468d to your computer and use it in GitHub Desktop.
Setup docker on CERN OpenStack.
#!/usr/bin/env bash
# install docker
yum remove -y docker docker-client docker-client-latest docker-common docker-latest docker-latest-logrotate docker-logrotate docker-engine
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 install -y docker-ce docker-ce-cli containerd.io
systemctl start docker
# enable autocompletion
yum install -y bash-completion bash-completion-extras
curl -L https://raw.githubusercontent.com/docker/machine/v0.16.2/contrib/completion/bash/docker-machine.bash -o /etc/bash_completion.d/docker-machine
curl -L https://raw.githubusercontent.com/docker/compose/1.27.4/contrib/completion/bash/docker-compose -o /etc/bash_completion.d/docker-compose
# firewall settings
setsebool -P httpd_can_network_connect 1
firewall-cmd --permanent --add-port=80/tcp
firewall-cmd --reload
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment