-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
41 lines (31 loc) · 939 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
38
39
40
41
# BUILDER
FROM golang:1.20.4-bullseye as builder
WORKDIR /workspace
ARG VERSION
ARG REVISION
ARG CREATED
ENV VERSION=$VERSION
ENV REVISION=$REVISION
ENV CREATED=$CREATED
COPY go.mod go.mod
COPY go.sum go.sum
RUN go mod download
COPY Makefile Makefile
COPY cmd/ cmd/
COPY internal/ internal/
RUN make build
ENV TINI_VERSION v0.19.0
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-static /tini
RUN chmod +x /tini
# hadolint ignore=DL3008
RUN apt-get update && \
apt-get -y --no-install-recommends install ca-certificates && \
update-ca-certificates
# RUNTIME
FROM gcr.io/distroless/static-debian11:nonroot
LABEL org.opencontainers.image.source="https://github.com/XenitAB/azad-kube-proxy"
WORKDIR /
COPY --from=builder /workspace/bin/azad-kube-proxy /azad-kube-proxy
COPY --from=builder /tini /tini
COPY --from=builder /etc/ssl/certs /etc/ssl/certs
ENTRYPOINT [ "/tini", "--", "/azad-kube-proxy"]