-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathDockerfile
37 lines (30 loc) · 908 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
ARG GO_VERSION=1.11.5
FROM golang:${GO_VERSION}-alpine
RUN apk --no-cache add ca-certificates make git
WORKDIR /src
COPY go.mod go.sum Makefile ./
RUN make vendor
COPY . .
RUN make test all
FROM alpine:latest
VOLUME /output
VOLUME /config
VOLUME /manifests
ENV KUBECTL_VERSION=1.8.9 \
KUBECTL_CHECKSUM=dc49a95b460585c3910264b4a44d717bb5b7a3e1c5f18315cb15662e99a0d231
# install kubectl
RUN apk update && \
apk add curl && \
curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl && \
chmod +x ./kubectl && \
mv ./kubectl /usr/bin/kubectl && \
apk del curl
COPY --from=0 /src/bin/k8s-config-projector /bin/k8s-config-projector
ENTRYPOINT [ \
"k8s-config-projector" \
]
CMD [ \
"--manifests=/manifests", \
"--config-repo=/config", \
"--output=/output" \
]