├── Dockerfile ├── README.md └── build_kubernetes.sh /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM debian:wheezy 2 | 3 | ## This is the version 0.19.1 + some more commits 4 | ## 0.19.1 does show IP address of the pod when invoked `kubectl describe` 5 | ## There is a merged PR in the following version 6 | ## That's why we are using it. 7 | ENV VERSION=ff0546da4fc23598de59db9f747c535545036463 8 | 9 | COPY build_kubernetes.sh /tmp/build_kubernetes.sh 10 | RUN sh /tmp/build_kubernetes.sh 11 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | #hyperkube 2 | 3 | Portable version of Kubernetes running inside a docker container. 4 | 5 | For more information, read this [shell script](https://github.com/meteorhacks/kube-init/blob/master/kube-init.sh) of the [kube-init](https://github.com/meteorhacks/kube-init) project. -------------------------------------------------------------------------------- /build_kubernetes.sh: -------------------------------------------------------------------------------- 1 | ## Deps 2 | apt-get update 3 | apt-get install -y build-essential wget rsync ca-certificates 4 | update-ca-certificates 5 | 6 | ## Install iptables 7 | apt-get install -y iptables 8 | 9 | cd /tmp 10 | 11 | ## Install Golang 12 | wget https://storage.googleapis.com/golang/go1.4.2.linux-amd64.tar.gz 13 | tar -C /usr/local -xzf go1.4.2.linux-amd64.tar.gz 14 | export PATH=$PATH:/usr/local/go/bin 15 | 16 | ## Build Kubernetes 17 | wget https://github.com/GoogleCloudPlatform/kubernetes/archive/$VERSION.tar.gz 18 | tar xzf $VERSION.tar.gz 19 | pwd 20 | ls 21 | cd /tmp/kubernetes* 22 | make 23 | 24 | ## Copy hyperkube to / 25 | ls 26 | cp ./_output/local/bin/linux/amd64/hyperkube / 27 | cp ./_output/local/bin/linux/amd64/kubectl / 28 | 29 | ## Cleanup to reduce the size 30 | rm -rf /tmp/* 31 | apt-get remove -y build-essential wget 32 | apt-get clean -y 33 | apt-get autoremove -y 34 | rm -rf /usr/local/go --------------------------------------------------------------------------------