woodpecker-autoscaler/Dockerfile
Tobias Trabelsi 9a5b9d1b55
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
ci/woodpecker/pr/woodpecker Pipeline failed
akeleton config and launch template
2023-10-29 22:44:39 +01:00

19 lines
540 B
Docker

FROM golang:1.21 as build
WORKDIR /app
COPY . .
RUN go mod tidy && CGO_ENABLED=0 GOOS=linux go build -a -tags netgo -ldflags '-w -extldflags "-static"' -o woodpecker-autoscaler ./cmd/
FROM scratch
COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
COPY --from=build /etc/passwd /etc/passwd
COPY --from=build /etc/group /etc/group
COPY --from=build --chown=65534:65534 /app/woodpecker-autoscaler /usr/local/bin/woodpecker-autoscaler
USER nobody
ENTRYPOINT ["/usr/local/bin/woodpecker-autoscaler"]