Skip to content

Commit

Permalink
Make konflux.Dockerfile a bit more like in downstream.
Browse files Browse the repository at this point in the history
  • Loading branch information
msugakov committed Feb 1, 2024
1 parent 51c1b0c commit 3a3e5f6
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions image/db/rhel/konflux.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@ LABEL \

USER root

ENV PG_MAJOR=12
ENV PATH="$PATH:/usr/pgsql-$PG_MAJOR/bin/" \
PGDATA="/var/lib/postgresql/data/pgdata"

COPY --chown=postgres:postgres image/db/rhel/scripts/docker-entrypoint.sh /usr/local/bin/
COPY image/db/postgresql.conf image/db/pg_hba.conf /etc/

Expand All @@ -35,17 +31,20 @@ RUN dnf upgrade -y --nobest && \
chown -R postgres:postgres /var/lib/postgresql && \
chown -R postgres:postgres /var/run/postgresql && \
dnf clean all && \
rpm --verbose -e --nodeps $(rpm -qa curl '*rpm*' '*dnf*' '*libsolv*' '*hawkey*' 'yum*') && \
rm -rf /var/cache/dnf /var/cache/yum && \
chown postgres:postgres /usr/local/bin/docker-entrypoint.sh && \
mkdir /docker-entrypoint-initdb.d && \
chmod +x /usr/local/bin/docker-entrypoint.sh

# This is equivalent to postgres:postgres.
USER 70:70

COPY pg-definitions.sql.gz /docker-entrypoint-initdb.d/definitions.sql.gz

ENV PG_MAJOR=12 \
PGDATA="/var/lib/postgresql/data/pgdata"

ENTRYPOINT ["docker-entrypoint.sh"]

EXPOSE 5432
CMD ["postgres", "-c", "config_file=/etc/postgresql.conf"]

USER 70:70

0 comments on commit 3a3e5f6

Please sign in to comment.