-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathDockerfile
36 lines (26 loc) · 1.02 KB
/
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
28
29
30
31
32
33
34
35
36
# build app
FROM golang:1.23-alpine3.20 AS app-builder
WORKDIR /src
ENV SERVICE=seasonpackarr
ARG VERSION=dev \
REVISION=dev \
BUILDTIME \
COPY go.mod go.sum ./
RUN go mod download
COPY . ./
RUN --network=none \
go build -ldflags "-s -w -X github.com/nuxencs/seasonpackarr/internal/buildinfo.Version=${VERSION} -X github.com/nuxencs/seasonpackarr/internal/buildinfo.Commit=${REVISION} -X github.com/nuxencs/seasonpackarr/internal/buildinfo.Date=${BUILDTIME}" -o bin/seasonpackarr main.go
# build runner
FROM alpine:latest
RUN apk add --no-cache ca-certificates curl tzdata jq
LABEL org.opencontainers.image.source="https://github.com/nuxencs/seasonpackarr" \
org.opencontainers.image.licenses="GPL-2.0-or-later" \
org.opencontainers.image.base.name="alpine:latest"
ENV HOME="/config" \
XDG_CONFIG_HOME="/config" \
XDG_DATA_HOME="/config"
WORKDIR /app
VOLUME /config
EXPOSE 42069
COPY --from=app-builder /src/bin/seasonpackarr /usr/bin/
ENTRYPOINT ["/usr/bin/seasonpackarr", "start", "--config", "/config"]