Closed LouisMT closed 3 years ago
If you don't want to wait, just grab the docker-upgrade
script from any of the folders (don't forget to make it executable!) and build this Dockerfile:
FROM postgres:14-bullseye
RUN sed -i 's/$/ 13/' /etc/apt/sources.list.d/pgdg.list
RUN apt-get update && apt-get install -y --no-install-recommends \
postgresql-13=13.4-4.pgdg110+1 \
&& rm -rf /var/lib/apt/lists/*
ENV PGBINOLD /usr/lib/postgresql/13/bin
ENV PGBINNEW /usr/lib/postgresql/14/bin
ENV PGDATAOLD /var/lib/postgresql/13/data
ENV PGDATANEW /var/lib/postgresql/14/data
RUN mkdir -p "$PGDATAOLD" "$PGDATANEW" \
&& chown -R postgres:postgres /var/lib/postgresql
WORKDIR /var/lib/postgresql
COPY docker-upgrade /usr/local/bin/
ENTRYPOINT ["docker-upgrade"]
# recommended: --link
CMD ["pg_upgrade"]
Postgres 14 has been released a few days ago and I would like to try out this tool to upgrade my Docker databases this time! 😄 Will keep an eye on this repository.
Thanks!