-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
27 lines (24 loc) · 1020 Bytes
/
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
# SPDX-FileCopyrightText: 2023 Risk.Ident GmbH <[email protected]>
#
# SPDX-License-Identifier: CC0-1.0
FROM docker.io/library/golang:1.23.2-alpine AS build
WORKDIR /jelease
COPY go.mod go.sum ./
RUN go mod download
ARG VERSION=latest
COPY . .
RUN go test -v ./... \
&& go build \
-ldflags "-X github.com/RiskIdent/jelease/cmd.appVersion=$VERSION" \
-o build/jelease main.go
# NOTE: When updating here, remember to also update in ./goreleaser.Dockerfile
FROM docker.io/library/alpine AS final
RUN apk add --no-cache ca-certificates diffutils patch git git-lfs helm \
&& addgroup -g 10000 jelease \
&& adduser -D -u 10000 -G jelease jelease
COPY --from=build /jelease/build/jelease /usr/local/bin/
CMD ["jelease", "serve"]
USER 10000
LABEL org.opencontainers.image.source=https://github.com/RiskIdent/jelease
LABEL org.opencontainers.image.description="Automatically create software update PRs and Jira tickets using newreleases.io webhooks."
LABEL org.opencontainers.image.licenses=GPL-3.0-or-later