Created
August 7, 2018 03:51
-
-
Save richardsonlima/0b23b9d44f66b83c16c29b6b91ab4565 to your computer and use it in GitHub Desktop.
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
# Portions Copyright 2016 The Kubernetes Authors All rights reserved. | |
# Portions Copyright 2018 AspenMesh | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software | |
# distributed under the License is distributed on an "AS IS" BASIS, | |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
# See the License for the specific language governing permissions and | |
# limitations under the License. | |
# | |
# Based on: | |
# https://github.com/kubernetes/minikube/tree/master/deploy/docker/localkube-dind | |
FROM debian:jessie | |
# Install minikube dependencies | |
RUN DEBIAN_FRONTEND=noninteractive apt-get update -y && \ | |
DEBIAN_FRONTEND=noninteractive apt-get -yy -q --no-install-recommends install \ | |
iptables \ | |
ebtables \ | |
ethtool \ | |
ca-certificates \ | |
conntrack \ | |
socat \ | |
git \ | |
nfs-common \ | |
glusterfs-client \ | |
cifs-utils \ | |
apt-transport-https \ | |
ca-certificates \ | |
curl \ | |
gnupg2 \ | |
software-properties-common \ | |
bridge-utils \ | |
ipcalc \ | |
aufs-tools \ | |
sudo \ | |
&& DEBIAN_FRONTEND=noninteractive apt-get clean && \ | |
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* | |
# Install docker | |
RUN \ | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - && \ | |
apt-key export "9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88" | gpg - && \ | |
echo "deb [arch=amd64] https://download.docker.com/linux/debian jessie stable" >> \ | |
/etc/apt/sources.list.d/docker.list && \ | |
DEBIAN_FRONTEND=noninteractive apt-get update && \ | |
DEBIAN_FRONTEND=noninteractive apt-get -yy -q --no-install-recommends install \ | |
docker-ce \ | |
&& DEBIAN_FRONTEND=noninteractive apt-get clean && \ | |
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* | |
VOLUME /var/lib/docker | |
EXPOSE 2375 | |
# Install minikube | |
RUN curl -Lo minikube https://storage.googleapis.com/minikube/releases/v0.24.1/minikube-linux-amd64 && chmod +x minikube | |
ENV MINIKUBE_WANTUPDATENOTIFICATION=false | |
ENV MINIKUBE_WANTREPORTERRORPROMPT=false | |
ENV CHANGE_MINIKUBE_NONE_USER=true | |
# minikube --vm-driver=none checks systemctl before starting. Instead of | |
# setting up a real systemd environment, install this shim to tell minikube | |
# what it wants to know: localkube isn't started yet. | |
COPY fake-systemctl.sh /usr/local/bin/systemctl | |
EXPOSE 8443 | |
# Install kubectl | |
RUN curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.9.1/bin/linux/amd64/kubectl && \ | |
chmod a+x kubectl && \ | |
mv kubectl /usr/local/bin | |
# Copy local start.sh | |
COPY start.sh /start.sh | |
RUN chmod a+x /start.sh | |
# If nothing else specified, start up docker and kubernetes. | |
CMD /start.sh & sleep 4 && tail -F /var/log/docker.log /var/log/dind.log /var/log/minikube-start.log |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment