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
|
|
@ -1,4 +1,4 @@
|
||||||
# adapted from Athens
|
# adapted from Athens
|
||||||
# https://github.com/gomods/athens/blob/main/cmd/proxy/Dockerfile
|
# https://github.com/gomods/athens/blob/main/cmd/proxy/Dockerfile
|
||||||
ARG GOLANG_VERSION=1.14
|
ARG GOLANG_VERSION=1.14
|
||||||
ARG ALPINE_VERSION=3.11.5
|
ARG ALPINE_VERSION=3.11.5
|
||||||
|
|
@ -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"]
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
# taken from Athens
|
# taken from Athens
|
||||||
# https://github.com/gomods/athens/blob/main/cmd/proxy/Dockerfile
|
# https://github.com/gomods/athens/blob/main/cmd/proxy/Dockerfile
|
||||||
ARG GOLANG_VERSION=1.14
|
ARG GOLANG_VERSION=1.14
|
||||||
ARG ALPINE_VERSION=3.11.5
|
ARG ALPINE_VERSION=3.11.5
|
||||||
|
|
@ -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