Initial commit.
This commit is contained in:
16
Dockerfile
Normal file
16
Dockerfile
Normal file
@@ -0,0 +1,16 @@
|
||||
# ---- build stage ----
|
||||
FROM golang:1.23 AS build
|
||||
WORKDIR /src
|
||||
COPY go.mod ./
|
||||
RUN go mod download
|
||||
COPY . .
|
||||
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -o /out/s3-ldap-monitor ./cmd/s3-ldap-monitor
|
||||
|
||||
|
||||
# ---- run stage ----
|
||||
FROM gcr.io/distroless/static-debian12
|
||||
WORKDIR /app
|
||||
COPY --from=build /out/s3-ldap-monitor /app/s3-ldap-monitor
|
||||
USER 65532:65532
|
||||
ENV GODEBUG=madvdontneed=1
|
||||
ENTRYPOINT ["/app/s3-ldap-monitor"]
|
||||
Reference in New Issue
Block a user