Renovate
01ee81ab6e
Reviewed-on: twhelp/corev3#19 Co-authored-by: Renovate <renovate@dwysokinski.me> Co-committed-by: Renovate <renovate@dwysokinski.me>
23 lines
494 B
Docker
23 lines
494 B
Docker
FROM golang:1.22.1-alpine3.19 AS builder
|
|
|
|
WORKDIR /twhelp
|
|
|
|
COPY go.mod go.sum ./
|
|
RUN go mod download && apk --no-cache add make
|
|
|
|
COPY . .
|
|
RUN make generate
|
|
ARG CI_COMMIT_TAG="development"
|
|
RUN CGO_ENABLED=0 go build -ldflags "-X main.version=${CI_COMMIT_TAG##v}" -trimpath -o twhelp ./cmd/twhelp
|
|
|
|
######## Start a new stage from scratch #######
|
|
FROM alpine:3.19
|
|
|
|
RUN apk --no-cache add ca-certificates tzdata
|
|
|
|
COPY --from=builder /twhelp/twhelp /usr/bin/
|
|
|
|
EXPOSE 9234/tcp
|
|
|
|
ENTRYPOINT ["twhelp"]
|