From 1a36cdc9defa55bb89225c6b6329cb1d1c746d50 Mon Sep 17 00:00:00 2001 From: Andrew Prokhorenkov Date: Tue, 12 Nov 2024 10:54:04 -0600 Subject: [PATCH] dep: use distroless --- Dockerfile | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 24a2c71..3df76a2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ ARG AZLINUX_BASE_VERSION=master -#FROM 707767160287.dkr.ecr.us-east-1.amazonaws.com/gen3/golang-build-base:${AZLINUX_BASE_VERSION} as base -FROM --platform=$BUILDPLATFORM quay.io/cdis/golang-build-base:${AZLINUX_BASE_VERSION} AS base +FROM 707767160287.dkr.ecr.us-east-1.amazonaws.com/gen3/golang-build-base:${AZLINUX_BASE_VERSION} as base +# FROM --platform=$BUILDPLATFORM quay.io/cdis/golang-build-base:${AZLINUX_BASE_VERSION} AS base ARG TARGETOS ARG TARGETARCH @@ -26,7 +26,6 @@ RUN GITCOMMIT=$(git rev-parse HEAD) \ -ldflags="-X 'github.com/uc-cdis/cohort-middleware/version.GitCommit=${GITCOMMIT}' -X 'github.com/uc-cdis/cohort-middleware/version.GitVersion=${GITVERSION}'" \ -o /cohort-middleware -FROM scratch -COPY --from=builder /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem /etc/ssl/certs/ca-certificates.crt +FROM gcr.io/distroless/static-debian12:nonroot COPY --from=builder /cohort-middleware /cohort-middleware CMD ["/cohort-middleware"]