Created
April 17, 2018 20:34
-
-
Save lukassup/06756e7a4998285f97afbd4efe6f822c 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-apiserver | |
FROM alpine:3.7 | |
RUN apk add --no-cache ca-certificates | |
COPY --from=builder /go/src/k8s.io/kubernetes/_output/local/bin/linux/amd64/kube-apiserver /usr/local/bin/kube-apiserver | |
RUN adduser kube -D | |
USER kube | |
WORKDIR /home/kube | |
VOLUME /home/kube/.kube | |
ENTRYPOINT ["/usr/local/bin/kube-apiserver"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment