Migrate CI to GitLab, clean up Dockerfile and repo

This commit is contained in:
Arnaud Delcasse
2026-03-02 20:41:59 +01:00
parent 722c89e86a
commit 1787a90909
7 changed files with 39 additions and 119 deletions

View File

@@ -1,28 +1,15 @@
FROM golang:alpine as builder
FROM golang:alpine AS builder
ARG ACCESS_TOKEN_USR="nothing"
ARG ACCESS_TOKEN_PWD="nothing"
RUN apk add --no-cache ca-certificates tzdata
WORKDIR /
# Create a netrc file using the credentials specified using --build-arg
RUN printf "machine git.coopgo.io\n\
login ${ACCESS_TOKEN_USR}\n\
password ${ACCESS_TOKEN_PWD}\n"\
>> ~/.netrc
RUN chmod 600 ~/.netrc
WORKDIR /app
COPY . .
RUN go mod download && CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o /server
RUN CGO_ENABLED=0 go build -o /server
FROM gcr.io/distroless/static:nonroot
FROM scratch
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=builder /usr/share/zoneinfo /usr/share/zoneinfo
COPY --from=builder /server /
COPY --from=builder /oidc-provider/web /oidc-provider/web
COPY --from=builder /app/oidc-provider/web /oidc-provider/web
EXPOSE 8080
EXPOSE 80