Skip to content
Snippets Groups Projects
Commit ae4ce95d authored by Jonas Leder's avatar Jonas Leder
Browse files

run container as non root user

parent f12bc69e
No related branches found
No related tags found
No related merge requests found
Pipeline #53214 passed
FROM --platform=$BUILDPLATFORM alpine:3.21.2 AS ca-certs
FROM --platform=$BUILDPLATFORM tonistiigi/xx:1.6.1 AS xx
FROM --platform=$BUILDPLATFORM golang:1.23.4 AS build
ARG TARGETPLATFORM
......@@ -9,9 +8,8 @@ RUN go mod download
COPY ./ ./
RUN CGO_ENABLED=0 GOOS=linux xx-go build -ldflags "-w -s" -o /imgshare
FROM scratch
FROM jonasled.dev/infra/images/scratch-rootless@sha256:76b6d85e02b63bb28a9b62998f4d0fb474d24297d6caf6e257763fe557858718
ENV GIN_MODE=release
COPY --from=ca-certs /etc/ssl /etc/ssl
COPY --from=build /imgshare /imgshare
ENTRYPOINT ["/imgshare"]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment