postgresql-backuper/Dockerfile

13 lines
282 B
Text
Raw Permalink Normal View History

2024-11-23 18:36:41 +05:00
FROM golang:1.23-alpine AS builder
WORKDIR /app
COPY go.mod main.go ./
RUN go build -o main
FROM alpine:3.20
RUN apk add postgresql16-client
COPY --from=builder /app/main /usr/local/bin/postgresql-backuper
RUN mkdir /backups
ENV BACKUPS_DIR="/backups"
CMD ["postgresql-backuper"]