infrastructure/app/postgres/build/postgres/Dockerfile

19 lines
505 B
Docker
Raw Normal View History

2021-03-07 11:54:03 +00:00
FROM golang:1.13-buster AS builder
2019-06-01 14:02:49 +00:00
2021-03-07 11:18:08 +00:00
ARG STOLON_VERSION
2021-03-07 11:54:03 +00:00
WORKDIR /stolon
RUN git clone https://github.com/sorintlab/stolon .
RUN git pull && git checkout ${STOLON_VERSION}
RUN go mod download
2021-04-15 10:38:31 +00:00
COPY 0001-Add-max-rate-to-pg_basebackup.patch .
RUN git am 0001-Add-max-rate-to-pg_basebackup.patch
2021-03-07 11:54:03 +00:00
RUN make && chmod +x /stolon/bin/*
2019-06-01 14:02:49 +00:00
2021-03-07 11:54:03 +00:00
FROM amd64/debian:stretch
ARG PG_VERSION
RUN apt-get update && \
apt-get install -y postgresql-all=${PG_VERSION}
COPY --from=builder /stolon/bin /usr/local/bin
2019-06-01 14:02:49 +00:00
USER postgres