generated from alecodes/base-template
26 lines
520 B
Docker
26 lines
520 B
Docker
FROM golang:1.23-alpine AS builder
|
|
|
|
WORKDIR /usr/src/app
|
|
|
|
# pre-copy/cache go.mod for pre-downloading dependencies and only redownloading them in subsequent builds if they change
|
|
COPY go.mod go.sum ./
|
|
RUN go mod download && go mod verify
|
|
|
|
COPY . .
|
|
RUN go build -v ./main.go
|
|
|
|
FROM alpine
|
|
|
|
COPY --from=builder /usr/src/app/main /usr/bin/miniflux-archiver
|
|
|
|
ENV MFA_CRON="* * * * *"
|
|
|
|
WORKDIR /app
|
|
|
|
COPY ./entrypoint.sh .
|
|
|
|
ENTRYPOINT ["./entrypoint.sh"]
|
|
|
|
RUN chmod +x entrypoint.sh /usr/bin/miniflux-archiver
|
|
|
|
CMD ["--help"]
|