Change images to scratch (#41)
* Change interceptor image to scratch Signed-off-by: Lucas Santos <lhs.santoss@gmail.com> * Update scaler to scratch image Signed-off-by: Lucas Santos <lhs.santoss@gmail.com>
This commit is contained in:
parent
4141b75b5a
commit
eaa2be89e6
|
|
@ -18,10 +18,10 @@ ENV CGO_ENABLED=0
|
||||||
ENV GOPROXY="https://proxy.golang.org"
|
ENV GOPROXY="https://proxy.golang.org"
|
||||||
RUN go build -o /bin/interceptor ./interceptor
|
RUN go build -o /bin/interceptor ./interceptor
|
||||||
|
|
||||||
FROM alpine:${ALPINE_VERSION}
|
FROM gcr.io/distroless/static:nonroot
|
||||||
|
WORKDIR /
|
||||||
COPY --from=builder /bin/interceptor /bin/interceptor
|
COPY --from=builder /bin/interceptor .
|
||||||
|
USER nonroot:nonroot
|
||||||
EXPOSE 8080
|
EXPOSE 8080
|
||||||
|
|
||||||
ENTRYPOINT ["/bin/interceptor"]
|
ENTRYPOINT ["/interceptor"]
|
||||||
|
|
|
||||||
|
|
@ -18,10 +18,10 @@ ENV CGO_ENABLED=0
|
||||||
ENV GOPROXY="https://proxy.golang.org"
|
ENV GOPROXY="https://proxy.golang.org"
|
||||||
RUN go build -o /bin/scaler ./scaler
|
RUN go build -o /bin/scaler ./scaler
|
||||||
|
|
||||||
FROM alpine:${ALPINE_VERSION}
|
FROM gcr.io/distroless/static:nonroot
|
||||||
|
WORKDIR /
|
||||||
COPY --from=builder /bin/scaler /bin/scaler
|
COPY --from=builder /bin/scaler .
|
||||||
|
USER nonroot:nonroot
|
||||||
EXPOSE 8080
|
EXPOSE 8080
|
||||||
|
|
||||||
ENTRYPOINT ["/bin/scaler"]
|
ENTRYPOINT ["/scaler"]
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue