FROM alpine:latest COPY pg_dump.sh / ENV \ PGDATABASE="" \ PGHOST="" \ PGPORT="" \ PGUSER="" \ PGPASSWORD="" RUN apk --no-cache add postgresql-client bash VOLUME ["/backup"] CMD ["/pg_dump.sh"]