Skip to content

Instantly share code, notes, and snippets.

@paulgessinger
Last active December 9, 2017 15:59
Show Gist options
  • Save paulgessinger/9c8f0fb98c12cb7fc048b6bb7c0b48f0 to your computer and use it in GitHub Desktop.
Save paulgessinger/9c8f0fb98c12cb7fc048b6bb7c0b48f0 to your computer and use it in GitHub Desktop.
#!/bin/bash
if [ "$(id -u)" != "0" ]; then
echo "This script must be run as root" 1>&2
exit 1
fi
echo "Setting up Docker"
apt-get install -y \
apt-transport-https \
ca-certificates \
curl \
gnupg2 \
software-properties-common
curl -fsSL https://download.docker.com/linux/$(. /etc/os-release; echo "$ID")/gpg | apt-key add -
add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/$(. /etc/os-release; echo "$ID") \
$(lsb_release -cs) \
stable"
apt-get update
apt-get install -y docker-ce
echo "Setting up GitLab Runner"
curl -L https://packages.gitlab.com/install/repositories/runner/gitlab-runner/script.deb.sh | sudo bash
apt-get -y install gitlab-runner
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment