Last active
March 25, 2018 14:30
-
-
Save squaredice/c7e689c51afbcfaaafaf31b8e8e9cac1 to your computer and use it in GitHub Desktop.
Kubeadm docker image
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM debian | |
ARG DEBIAN_FRONTEND=noninteractive | |
RUN apt-get update -qq &&\ | |
apt-get install -y \ | |
apt-transport-https \ | |
ca-certificates \ | |
curl \ | |
iptables \ | |
build-essential \ | |
software-properties-common &&\ | |
apt-get update &&\ | |
apt-get install aptitude -y &&\ | |
aptitude install -y \ | |
systemd \ | |
systemd-sysv \ | |
sysvinit-core \ | |
initscripts \ | |
gnupg2 | |
RUN for i in /lib/systemd/system/sysinit.target.wants/*; do [ "${i##*/}" = "systemd-tmpfiles-setup.service" ] || rm -f "$i"; done; \ | |
rm -f /lib/systemd/system/multi-user.target.wants/*;\ | |
rm -f /etc/systemd/system/*.wants/*;\ | |
rm -f /lib/systemd/system/local-fs.target.wants/*; \ | |
rm -f /lib/systemd/system/sockets.target.wants/*udev*; \ | |
rm -f /lib/systemd/system/sockets.target.wants/*initctl*; \ | |
rm -f /lib/systemd/system/basic.target.wants/*;\ | |
rm -f /lib/systemd/system/anaconda.target.wants/*; | |
RUN sh -c 'curl -fsSL https://download.docker.com/linux/$(. /etc/os-release; echo "$ID")/gpg | apt-key add -' &&\ | |
sh -c '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 docker-ce -y &&\ | |
sh -c 'curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -' &&\ | |
sh -c 'echo "deb http://apt.kubernetes.io/ kubernetes-xenial main" > /etc/apt/sources.list.d/kubernetes.list'&&\ | |
apt-get update -y &&\ | |
apt-get install -y \ | |
kubelet \ | |
kubectl &&\ | |
apt-get install -y \ | |
kubeadm; exit 0 | |
VOLUME /var/lib/docker |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment