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:
Lucas Santos 2021-02-11 16:17:11 -03:00 committed by GitHub
parent 4141b75b5a
commit eaa2be89e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 12 deletions

View File

@ -1,4 +1,4 @@
# adapted from Athens
# adapted from Athens
# https://github.com/gomods/athens/blob/main/cmd/proxy/Dockerfile
ARG GOLANG_VERSION=1.14
ARG ALPINE_VERSION=3.11.5
@ -18,10 +18,10 @@ ENV CGO_ENABLED=0
ENV GOPROXY="https://proxy.golang.org"
RUN go build -o /bin/interceptor ./interceptor
FROM alpine:${ALPINE_VERSION}
COPY --from=builder /bin/interceptor /bin/interceptor
FROM gcr.io/distroless/static:nonroot
WORKDIR /
COPY --from=builder /bin/interceptor .
USER nonroot:nonroot
EXPOSE 8080
ENTRYPOINT ["/bin/interceptor"]
ENTRYPOINT ["/interceptor"]

View File

@ -1,4 +1,4 @@
# taken from Athens
# taken from Athens
# https://github.com/gomods/athens/blob/main/cmd/proxy/Dockerfile
ARG GOLANG_VERSION=1.14
ARG ALPINE_VERSION=3.11.5
@ -18,10 +18,10 @@ ENV CGO_ENABLED=0
ENV GOPROXY="https://proxy.golang.org"
RUN go build -o /bin/scaler ./scaler
FROM alpine:${ALPINE_VERSION}
COPY --from=builder /bin/scaler /bin/scaler
FROM gcr.io/distroless/static:nonroot
WORKDIR /
COPY --from=builder /bin/scaler .
USER nonroot:nonroot
EXPOSE 8080
ENTRYPOINT ["/bin/scaler"]
ENTRYPOINT ["/scaler"]