Created
April 17, 2018 20:35
-
-
Save lukassup/bde6995590b8542b2afd719bd6f99275 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-scheduler | |
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-scheduler /usr/local/bin/kube-scheduler | |
RUN adduser kube -D | |
USER kube | |
WORKDIR /home/kube | |
VOLUME /home/kube/.kube | |
ENTRYPOINT ["/usr/local/bin/kube-scheduler"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment