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
|
|
|
|
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
|
|
|
|
|