-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
39 lines (28 loc) · 1.08 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# Code generated by craft; DO NOT EDIT.
#############################
# STAGE BUILD #
#############################
FROM golang:1.23.3 AS build
WORKDIR /app
COPY . .
# hadolint ignore=DL3059
RUN go mod download
# hadolint ignore=DL3059
RUN CGO_ENABLED=0 go build -o gitlab-storage-cleaner cmd/gitlab-storage-cleaner/main.go
#############################
# STAGE RUN #
#############################
FROM gcr.io/distroless/static-debian12:nonroot
LABEL org.opencontainers.image.authors="kilianpaquier"
LABEL org.opencontainers.image.vendor="kilianpaquier"
LABEL org.opencontainers.image.title="gitlab-storage-cleaner"
LABEL org.opencontainers.image.licenses="MIT"
LABEL org.opencontainers.image.url="github.com/kilianpaquier/gitlab-storage-cleaner"
LABEL org.opencontainers.image.source="github.com/kilianpaquier/gitlab-storage-cleaner"
LABEL org.opencontainers.image.documentation="github.com/kilianpaquier/gitlab-storage-cleaner"
WORKDIR /app
COPY --from=build \
/app/gitlab-storage-cleaner \
./
EXPOSE 3000
ENTRYPOINT [ "/app/gitlab-storage-cleaner" ]