Skip to content

Commit 7e7bc2b

Browse files
committed
Use /run/postgresql and create it if not exists
1 parent d036b26 commit 7e7bc2b

11 files changed

+22
-11
lines changed

12/Dockerfile.rhel8

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ RUN yum -y module enable postgresql:12 && \
5454
localedef -f UTF-8 -i en_US en_US.UTF-8 && \
5555
test "$(id postgres)" = "uid=26(postgres) gid=26(postgres) groups=26(postgres)" && \
5656
mkdir -p /var/lib/pgsql/data && \
57-
/usr/libexec/fix-permissions /var/lib/pgsql /var/run/postgresql
57+
mkdir -p /run/postgresql && \
58+
/usr/libexec/fix-permissions /var/lib/pgsql /run/postgresql
5859

5960
# Get prefix path and path to scripts rather than hard-code them in scripts
6061
ENV CONTAINER_SCRIPTS_PATH=/usr/share/container-scripts/postgresql \

13/Dockerfile.c9s

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ RUN { yum -y module enable postgresql:13 || :; } && \
5252
localedef -f UTF-8 -i en_US en_US.UTF-8 && \
5353
test "$(id postgres)" = "uid=26(postgres) gid=26(postgres) groups=26(postgres)" && \
5454
mkdir -p /var/lib/pgsql/data && \
55-
/usr/libexec/fix-permissions /var/lib/pgsql /var/run/postgresql
55+
mkdir -p /run/postgresql && \
56+
/usr/libexec/fix-permissions /var/lib/pgsql /run/postgresql
5657

5758
# Get prefix path and path to scripts rather than hard-code them in scripts
5859
ENV CONTAINER_SCRIPTS_PATH=/usr/share/container-scripts/postgresql \

13/Dockerfile.rhel8

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ RUN yum -y module enable postgresql:13 && \
5454
localedef -f UTF-8 -i en_US en_US.UTF-8 && \
5555
test "$(id postgres)" = "uid=26(postgres) gid=26(postgres) groups=26(postgres)" && \
5656
mkdir -p /var/lib/pgsql/data && \
57-
/usr/libexec/fix-permissions /var/lib/pgsql /var/run/postgresql
57+
mkdir -p /run/postgresql && \
58+
/usr/libexec/fix-permissions /var/lib/pgsql /run/postgresql
5859

5960
# Get prefix path and path to scripts rather than hard-code them in scripts
6061
ENV CONTAINER_SCRIPTS_PATH=/usr/share/container-scripts/postgresql \

13/Dockerfile.rhel9

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ RUN { yum -y module enable postgresql:13 || :; } && \
5454
localedef -f UTF-8 -i en_US en_US.UTF-8 && \
5555
test "$(id postgres)" = "uid=26(postgres) gid=26(postgres) groups=26(postgres)" && \
5656
mkdir -p /var/lib/pgsql/data && \
57-
/usr/libexec/fix-permissions /var/lib/pgsql /var/run/postgresql
57+
mkdir -p /run/postgresql && \
58+
/usr/libexec/fix-permissions /var/lib/pgsql /run/postgresql
5859

5960
# Get prefix path and path to scripts rather than hard-code them in scripts
6061
ENV CONTAINER_SCRIPTS_PATH=/usr/share/container-scripts/postgresql \

15/Dockerfile.c9s

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ RUN { yum -y module enable postgresql:15 || :; } && \
5252
localedef -f UTF-8 -i en_US en_US.UTF-8 && \
5353
test "$(id postgres)" = "uid=26(postgres) gid=26(postgres) groups=26(postgres)" && \
5454
mkdir -p /var/lib/pgsql/data && \
55-
/usr/libexec/fix-permissions /var/lib/pgsql /var/run/postgresql
55+
mkdir -p /run/postgresql && \
56+
/usr/libexec/fix-permissions /var/lib/pgsql /run/postgresql
5657

5758
# Get prefix path and path to scripts rather than hard-code them in scripts
5859
ENV CONTAINER_SCRIPTS_PATH=/usr/share/container-scripts/postgresql \

15/Dockerfile.rhel8

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ RUN yum -y module enable postgresql:15 && \
5454
localedef -f UTF-8 -i en_US en_US.UTF-8 && \
5555
test "$(id postgres)" = "uid=26(postgres) gid=26(postgres) groups=26(postgres)" && \
5656
mkdir -p /var/lib/pgsql/data && \
57-
/usr/libexec/fix-permissions /var/lib/pgsql /var/run/postgresql
57+
mkdir -p /run/postgresql && \
58+
/usr/libexec/fix-permissions /var/lib/pgsql /run/postgresql
5859

5960
# Get prefix path and path to scripts rather than hard-code them in scripts
6061
ENV CONTAINER_SCRIPTS_PATH=/usr/share/container-scripts/postgresql \

15/Dockerfile.rhel9

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ RUN { yum -y module enable postgresql:15 || :; } && \
5454
localedef -f UTF-8 -i en_US en_US.UTF-8 && \
5555
test "$(id postgres)" = "uid=26(postgres) gid=26(postgres) groups=26(postgres)" && \
5656
mkdir -p /var/lib/pgsql/data && \
57-
/usr/libexec/fix-permissions /var/lib/pgsql /var/run/postgresql
57+
mkdir -p /run/postgresql && \
58+
/usr/libexec/fix-permissions /var/lib/pgsql /run/postgresql
5859

5960
# Get prefix path and path to scripts rather than hard-code them in scripts
6061
ENV CONTAINER_SCRIPTS_PATH=/usr/share/container-scripts/postgresql \

16/Dockerfile.c9s

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ RUN { yum -y module enable postgresql:16 || :; } && \
5252
localedef -f UTF-8 -i en_US en_US.UTF-8 && \
5353
test "$(id postgres)" = "uid=26(postgres) gid=26(postgres) groups=26(postgres)" && \
5454
mkdir -p /var/lib/pgsql/data && \
55-
/usr/libexec/fix-permissions /var/lib/pgsql /var/run/postgresql
55+
mkdir -p /run/postgresql && \
56+
/usr/libexec/fix-permissions /var/lib/pgsql /run/postgresql
5657

5758
# Get prefix path and path to scripts rather than hard-code them in scripts
5859
ENV CONTAINER_SCRIPTS_PATH=/usr/share/container-scripts/postgresql \

16/Dockerfile.rhel8

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ RUN yum -y module enable postgresql:16 && \
5454
localedef -f UTF-8 -i en_US en_US.UTF-8 && \
5555
test "$(id postgres)" = "uid=26(postgres) gid=26(postgres) groups=26(postgres)" && \
5656
mkdir -p /var/lib/pgsql/data && \
57-
/usr/libexec/fix-permissions /var/lib/pgsql /var/run/postgresql
57+
mkdir -p /run/postgresql && \
58+
/usr/libexec/fix-permissions /var/lib/pgsql /run/postgresql
5859

5960
# Get prefix path and path to scripts rather than hard-code them in scripts
6061
ENV CONTAINER_SCRIPTS_PATH=/usr/share/container-scripts/postgresql \

16/Dockerfile.rhel9

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ RUN { yum -y module enable postgresql:16 || :; } && \
5454
localedef -f UTF-8 -i en_US en_US.UTF-8 && \
5555
test "$(id postgres)" = "uid=26(postgres) gid=26(postgres) groups=26(postgres)" && \
5656
mkdir -p /var/lib/pgsql/data && \
57-
/usr/libexec/fix-permissions /var/lib/pgsql /var/run/postgresql
57+
mkdir -p /run/postgresql && \
58+
/usr/libexec/fix-permissions /var/lib/pgsql /run/postgresql
5859

5960
# Get prefix path and path to scripts rather than hard-code them in scripts
6061
ENV CONTAINER_SCRIPTS_PATH=/usr/share/container-scripts/postgresql \

src/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,8 @@ RUN {{ spec.environment_setup }}
8181
localedef -f UTF-8 -i en_US en_US.UTF-8 && \
8282
test "$(id postgres)" = "uid=26(postgres) gid=26(postgres) groups=26(postgres)" && \
8383
mkdir -p /var/lib/pgsql/data && \
84-
/usr/libexec/fix-permissions /var/lib/pgsql /var/run/postgresql
84+
mkdir -p /run/postgresql && \
85+
/usr/libexec/fix-permissions /var/lib/pgsql /run/postgresql
8586

8687
# Get prefix path and path to scripts rather than hard-code them in scripts
8788
ENV CONTAINER_SCRIPTS_PATH=/usr/share/container-scripts/postgresql \

0 commit comments

Comments
 (0)