diff --git a/postgres/Dockerfile b/postgres/Dockerfile index 8906042a..f1a6c36b 100644 --- a/postgres/Dockerfile +++ b/postgres/Dockerfile @@ -16,7 +16,7 @@ RUN source /os-release && \ mkdir /install_root \ && swupd os-install -V ${VERSION_ID} \ --path /install_root --statedir /swupd-state \ - --bundles=postgresql11,su-exec --no-boot-update + --bundles=postgresql12,su-exec --no-boot-update # For some Host OS configuration with redirect_dir on, # extra data are saved on the upper layer when the same @@ -31,10 +31,10 @@ FROM clearlinux/os-core:latest COPY --from=builder /install_root / -ENV PATH $PATH:/usr/libexec/postgresql11 +ENV PATH $PATH:/usr/libexec/postgresql12 ENV PGDATA /var/lib/pgsql/data -RUN sed -i "s|#listen_addresses.*|listen_addresses = '*'|" /usr/share/postgresql11/postgresql.conf.sample && \ - mkdir -p /run/postgresql11 && chown -R postgres:postgres /run/postgresql11 && \ +RUN sed -i "s|#listen_addresses.*|listen_addresses = '*'|" /usr/share/postgresql12/postgresql.conf.sample && \ + mkdir -p /run/postgresql12 && chown -R postgres:postgres /run/postgresql12 && \ mkdir -p "$PGDATA" && chown -R postgres:postgres "$PGDATA" && \ mkdir /docker-entrypoint-initdb.d && \ mkdir -p /usr/local/bin @@ -43,7 +43,7 @@ VOLUME /var/lib/pgsql/data COPY docker-entrypoint.sh /usr/local/bin/ RUN chmod +x /usr/local/bin/docker-entrypoint.sh && \ ln -s /usr/local/bin/docker-entrypoint.sh / && \ - ln -s /usr/share/postgresql11 /usr/share/postgresql + ln -s /usr/share/postgresql12 /usr/share/postgresql ENTRYPOINT ["docker-entrypoint.sh"] diff --git a/postgres/docker-entrypoint.sh b/postgres/docker-entrypoint.sh index 8f09db9d..f42c9b50 100644 --- a/postgres/docker-entrypoint.sh +++ b/postgres/docker-entrypoint.sh @@ -34,9 +34,9 @@ if [ "$1" = 'postgres' ] && [ "$(id -u)" = '0' ]; then chown -R postgres "$PGDATA" chmod 700 "$PGDATA" - mkdir -p /var/run/postgresql11 - chown -R postgres /var/run/postgresql11 - chmod 775 /var/run/postgresql11 + mkdir -p /var/run/postgresql12 + chown -R postgres /var/run/postgresql12 + chmod 775 /var/run/postgresql12 # Create the transaction log directory before initdb is run (below) so the directory is owned by the correct user if [ "$POSTGRES_INITDB_WALDIR" ]; then