infrastructure/app/postgres/build/postgres/Dockerfile

17 lines
405 B
Docker

FROM golang:1.13-buster AS builder
ARG STOLON_VERSION
WORKDIR /stolon
RUN git clone https://github.com/sorintlab/stolon .
RUN git pull && git checkout ${STOLON_VERSION}
RUN go mod download
RUN make && chmod +x /stolon/bin/*
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
USER postgres