Skip to content

Instantly share code, notes, and snippets.

@heckj
Forked from indykish/dockerinstall_xenial.sh
Last active December 25, 2018 20:41
Show Gist options
  • Save heckj/15c06bb2cd3422a1f3ab4964df195049 to your computer and use it in GitHub Desktop.
Save heckj/15c06bb2cd3422a1f3ab4964df195049 to your computer and use it in GitHub Desktop.
Install Docker 1.12.6 on Ubuntu Xenial 16.04.4 x64
# Install Docker on Xenial 16.04.1 x64
# Ref https://docs.docker.com/engine/installation/linux/ubuntulinux/
# No interactive for now.
export DEBIAN_FRONTEND=noninteractive
# Update your APT package index.
sudo apt-get -y update
# Update package information, ensure that APT works with the https method, and that CA certificates are installed.
sudo apt-get -y install apt-transport-https ca-certificates
# Add the new GPG key.
sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
# Add docker.list
echo "deb https://apt.dockerproject.org/repo ubuntu-xenial experimental" | sudo tee /etc/apt/sources.list.d/docker.list
# Update your APT package index.
sudo apt-get -y update
# Purge the old repo if it exists.
sudo apt-get purge lxc-docker
# Verify that APT is pulling from the right repository.
sudo apt-cache policy docker-engine
# Install the recommended package.
sudo apt-get -y install linux-image-extra-$(uname -r)
# Install Docker.
sudo apt-get -y install docker-engine
# Start the docker daemon.
sudo service docker start
# Validate docker version
docker -v
#
# install kubeadm and kubectl
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -
echo "deb http://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee /etc/apt/sources.list.d/kubernetes.list
sudo apt-get update
sudo apt-get install -y kubelet kubeadm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment