23 lines
825 B
Docker
23 lines
825 B
Docker
FROM golang:1-alpine AS builder
|
|
ARG BuiltAt
|
|
ARG GitCommit
|
|
ARG Version
|
|
WORKDIR /app
|
|
COPY . .
|
|
RUN apk add --no-cache bash git go gcc musl-dev curl fuse libxml2-utils
|
|
RUN go build -ldflags "-s -w -X 'github.com/debridmediamanager/zurg/internal/version.BuiltAt=$BuiltAt' -X 'github.com/debridmediamanager/zurg/internal/version.GitCommit=$GitCommit' -X 'github.com/debridmediamanager/zurg/internal/version.Version=$Version'" -o zurg ./cmd/zurg
|
|
|
|
FROM alpine:3
|
|
WORKDIR /app
|
|
|
|
COPY --from=builder /app/zurg .
|
|
COPY ./healthcheck.sh /app/healthcheck.sh
|
|
RUN chmod +x /app/healthcheck.sh
|
|
COPY config.example.yml /app/config.yml
|
|
# Install runtime dependencies and configure FUSE
|
|
RUN apk add curl python3 libxml2-utils
|
|
|
|
HEALTHCHECK --interval=60s --timeout=60s --start-period=10s --retries=10 CMD /app/healthcheck.sh
|
|
|
|
ENTRYPOINT ["./zurg"]
|