We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ee3786c commit 2b811fcCopy full SHA for 2b811fc
Containerfile
@@ -0,0 +1,21 @@
1
+FROM docker.io/golang:1.23.7-alpine AS build
2
+
3
+ARG GITLAB_SYNC_VERSION="dev"
4
5
+WORKDIR /app
6
7
+COPY go.mod .
8
+COPY ./cmd/ ./cmd/
9
+COPY ./mirroring/ ./mirroring/
10
+COPY ./utils/ ./utils/
11
12
+RUN go mod tidy && \
13
+ go build -ldflags "-X 'main.version=${GITLAB_SYNC_VERSION}'" -o /app/bin/gitlab-sync ./cmd/main.go
14
15
+FROM docker.io/alpine:latest
16
17
+RUN adduser -u 1000 -D -S gitlab-sync
18
19
+COPY --from=build --chown=gitlab-sync --chmod=550 /app/bin/gitlab-sync /usr/local/bin/gitlab-sync
20
21
+ENTRYPOINT [ "/usr/local/bin/gitlab-sync" ]
0 commit comments