Skip to content

Instantly share code, notes, and snippets.

@damianobarbati
Last active May 22, 2020 19:59
Show Gist options
  • Save damianobarbati/e299a8a006b357b118fae1d8a12c9c88 to your computer and use it in GitHub Desktop.
Save damianobarbati/e299a8a006b357b118fae1d8a12c9c88 to your computer and use it in GitHub Desktop.
Droplet setup
# remove LANG warning on ssh connection
printf "LANG=en_US.utf-8\nLC_ALL=en_US.utf-8" > /etc/environment
# if you have strong reasons disable selinux...
printf "SELINUX=disabled" > /etc/selinux/config
# update system
yum upgrade -y
yum clean all
yum makecache timer
# docker on centos7 (https://docs.docker.com/install/linux/docker-ce/centos)
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
# docker on centos8
dnf config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo
dnf install docker-ce --nobest -y
systemctl enable docker
systemctl start docker
# install docker-compose (https://docs.docker.com/compose/install/)
curl -L "https://github.com/docker/compose/releases/download/1.25.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
# nodejs and yarn are always handy
curl --silent --location https://rpm.nodesource.com/setup_12.x | bash - && yum install -y nodejs
npm install -g yarn
# reboot and let the party begin
reboot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment