Created
April 17, 2018 20:35
-
-
Save lukassup/11df0a2ea634f3061cd0ab76a7c4d86b to your computer and use it in GitHub Desktop.
This file contains 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 golang:1.10 as builder | |
RUN apt-get update && apt-get install -y rsync | |
WORKDIR /go/src/k8s.io/kubernetes | |
ARG KUBE_VERSION=v1.10.1 | |
ENV KUBE_VERSION=${KUBE_VERSION} | |
RUN git clone --depth=1 --branch="${KUBE_VERSION}" https://github.com/kubernetes/kubernetes.git . | |
RUN GOOS=linux GOARCH=amd64 CGO_ENABLED=0 KUBE_BUILD_PLATFORMS=linux/amd64 make WHAT=cmd/kube-proxy | |
FROM debian:9-slim | |
RUN apt-get update && \ | |
apt-get install -y --no-install-recommends conntrack ebtables ipset iptables kmod iptables && \ | |
rm -rf /var/cache/debconf/* /var/lib/apt/lists/* /var/log/* /tmp/* /var/tmp/* | |
COPY --from=builder /go/src/k8s.io/kubernetes/_output/local/bin/linux/amd64/kube-proxy /usr/local/bin/kube-proxy | |
RUN useradd kube | |
USER kube | |
WORKDIR /home/kube | |
VOLUME /home/kube/.kube | |
ENTRYPOINT ["/usr/local/bin/kube-proxy"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment