-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ca3acdb
commit 1ce917c
Showing
1 changed file
with
29 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
FROM golang:alpine AS build | ||
|
||
RUN apk add --no-cache \ | ||
git \ | ||
curl | ||
|
||
RUN mkdir -p /out/usr/local/bin | ||
|
||
ENV KUBELETMEIN $GOPATH/src/github.com/4armed/kubeletmein | ||
RUN mkdir -p "$(dirname ${KUBELETMEIN})" | ||
COPY . $KUBELETMEIN | ||
|
||
WORKDIR $KUBELETMEIN | ||
RUN go build ./cmd/kubeletmein && cp ./kubeletmein /out/usr/local/bin/kubeletmein | ||
|
||
WORKDIR /out | ||
RUN curl -sL https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl -o usr/local/bin/kubectl && \ | ||
chmod +x usr/local/bin/kubectl | ||
|
||
FROM google/cloud-sdk:alpine | ||
LABEL maintainer="Marc Wickenden <[email protected]>" | ||
|
||
RUN addgroup -S app && adduser -S app -G app | ||
|
||
COPY --from=build /out / | ||
USER app | ||
WORKDIR /home/app | ||
|
||
CMD [ "kubeletmein" ] |