Skip to content

Commit

Permalink
dep: use distroless
Browse files Browse the repository at this point in the history
  • Loading branch information
m0nhawk committed Nov 16, 2024
1 parent 56a014f commit 1a36cdc
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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"]

0 comments on commit 1a36cdc

Please sign in to comment.