All checks were successful
continuous-integration/drone/push Build is passing
27 lines
817 B
Docker
27 lines
817 B
Docker
FROM golang:1.21-bullseye AS builder
|
|
|
|
WORKDIR /usr/local/src/pg_autoconfig
|
|
COPY go.* ./
|
|
COPY *.go ./
|
|
RUN go mod download
|
|
|
|
RUN mkdir bin/ && go build -o bin/ ./...
|
|
|
|
FROM postgis/postgis:15-master
|
|
|
|
COPY --from=builder /usr/local/src/pg_autoconfig/bin/pg_autoconfig /
|
|
|
|
COPY upgrade-entrypoint.sh /
|
|
|
|
RUN localedef -i cs_CZ -c -f UTF-8 -A /usr/share/locale/locale.alias cz_CZ.UTF-8 && \
|
|
apt-get update && apt-get install -y \
|
|
postgresql-15 postgresql-client-15 postgresql-15-auto-failover pg-auto-failover-cli postgresql-15-pgvector \
|
|
# Include previous postgres version to allow automatic upgrade
|
|
postgresql-14 postgresql-14-postgis-3 postgresql-14-pgvector && \
|
|
rm -rf /var/lib/apt/lists/* && \
|
|
chmod +x /upgrade-entrypoint.sh
|
|
|
|
#ENV LANG en_GB.utf8
|
|
|
|
ENTRYPOINT [ "/upgrade-entrypoint.sh" ]
|
|
CMD [ "/pg_autoconfig" ] |