Skip to content

Commit 762dc2e

Browse files
committed
add distgen-generated files
1 parent 5089c58 commit 762dc2e

File tree

7 files changed

+349
-0
lines changed

7 files changed

+349
-0
lines changed

10/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
./Dockerfile.centos7

12/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
./Dockerfile.centos7

12/Dockerfile.centos7

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
FROM quay.io/centos7/s2i-core-centos7
2+
3+
# PostgreSQL image for OpenShift.
4+
# Volumes:
5+
# * /var/lib/pgsql/data - Database cluster for PostgreSQL
6+
# Environment:
7+
# * $POSTGRESQL_USER - Database user name
8+
# * $POSTGRESQL_PASSWORD - User's password
9+
# * $POSTGRESQL_DATABASE - Name of the database to create
10+
# * $POSTGRESQL_ADMIN_PASSWORD (Optional) - Password for the 'postgres'
11+
# PostgreSQL administrative account
12+
13+
ENV POSTGRESQL_VERSION=12 \
14+
POSTGRESQL_PREV_VERSION=10 \
15+
HOME=/var/lib/pgsql \
16+
PGUSER=postgres \
17+
APP_DATA=/opt/app-root
18+
19+
ENV SUMMARY="PostgreSQL is an advanced Object-Relational database management system" \
20+
DESCRIPTION="PostgreSQL is an advanced Object-Relational database management system (DBMS). \
21+
The image contains the client and server programs that you'll need to \
22+
create, run, maintain and access a PostgreSQL DBMS server."
23+
24+
LABEL summary="$SUMMARY" \
25+
description="$DESCRIPTION" \
26+
io.k8s.description="$DESCRIPTION" \
27+
io.k8s.display-name="PostgreSQL 12" \
28+
io.openshift.expose-services="5432:postgresql" \
29+
io.openshift.tags="database,postgresql,postgresql12,rh-postgresql12" \
30+
io.openshift.s2i.assemble-user="26" \
31+
name="centos7/postgresql-12-centos7" \
32+
com.redhat.component="rh-postgresql12-container" \
33+
version="1" \
34+
usage="podman run -d --name postgresql_database -e POSTGRESQL_USER=user -e POSTGRESQL_PASSWORD=pass -e POSTGRESQL_DATABASE=db -p 5432:5432 centos7/postgresql-12-centos7" \
35+
maintainer="SoftwareCollections.org <sclorg@redhat.com>"
36+
37+
EXPOSE 5432
38+
39+
COPY root/usr/libexec/fix-permissions /usr/libexec/fix-permissions
40+
41+
# This image must forever use UID 26 for postgres user so our volumes are
42+
# safe in the future. This should *never* change, the last test is there
43+
# to make sure of that.
44+
RUN yum install -y centos-release-scl-rh && \
45+
INSTALL_PKGS="rsync tar gettext bind-utils nss_wrapper rh-postgresql12 rh-postgresql12-postgresql-contrib rh-postgresql12-syspaths rh-postgresql10-postgresql-server" && \
46+
INSTALL_PKGS="$INSTALL_PKGS rh-postgresql12-pgaudit" && \
47+
yum -y --setopt=tsflags=nodocs install $INSTALL_PKGS && \
48+
rpm -V $INSTALL_PKGS && \
49+
yum -y clean all --enablerepo='*' && \
50+
localedef -f UTF-8 -i en_US en_US.UTF-8 && \
51+
test "$(id postgres)" = "uid=26(postgres) gid=26(postgres) groups=26(postgres)" && \
52+
mkdir -p /var/lib/pgsql/data && \
53+
/usr/libexec/fix-permissions /var/lib/pgsql /var/run/postgresql
54+
55+
# Get prefix path and path to scripts rather than hard-code them in scripts
56+
ENV CONTAINER_SCRIPTS_PATH=/usr/share/container-scripts/postgresql \
57+
ENABLED_COLLECTIONS=rh-postgresql12
58+
59+
COPY root /
60+
COPY ./s2i/bin/ $STI_SCRIPTS_PATH
61+
62+
# When bash is started non-interactively, to run a shell script, for example it
63+
# looks for this variable and source the content of this file. This will enable
64+
# the SCL for all scripts without need to do 'scl enable'.
65+
ENV BASH_ENV=${CONTAINER_SCRIPTS_PATH}/scl_enable \
66+
ENV=${CONTAINER_SCRIPTS_PATH}/scl_enable \
67+
PROMPT_COMMAND=". ${CONTAINER_SCRIPTS_PATH}/scl_enable"
68+
69+
# Not using VOLUME statement since it's not working in OpenShift Online:
70+
# https://github.com/sclorg/httpd-container/issues/30
71+
# VOLUME ["/var/lib/pgsql/data"]
72+
73+
# S2I permission fixes
74+
# --------------------
75+
# 1. unless specified otherwise (or - equivalently - we are in OpenShift), s2i
76+
# build process would be executed as 'uid=26(postgres) gid=26(postgres)'.
77+
# Such process wouldn't be able to execute the default 'assemble' script
78+
# correctly (it transitively executes 'fix-permissions' script). So let's
79+
# add the 'postgres' user into 'root' group here
80+
#
81+
# 2. we call fix-permissions on $APP_DATA here directly (UID=0 during build
82+
# anyways) to assure that s2i process is actually able to _read_ the
83+
# user-specified scripting.
84+
RUN usermod -a -G root postgres && \
85+
/usr/libexec/fix-permissions --read-only "$APP_DATA"
86+
87+
USER 26
88+
89+
ENTRYPOINT ["container-entrypoint"]
90+
CMD ["run-postgresql"]

12/Dockerfile.fedora

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
FROM quay.io/fedora/s2i-core:35
2+
3+
# PostgreSQL image for OpenShift.
4+
# Volumes:
5+
# * /var/lib/psql/data - Database cluster for PostgreSQL
6+
# Environment:
7+
# * $POSTGRESQL_USER - Database user name
8+
# * $POSTGRESQL_PASSWORD - User's password
9+
# * $POSTGRESQL_DATABASE - Name of the database to create
10+
# * $POSTGRESQL_ADMIN_PASSWORD (Optional) - Password for the 'postgres'
11+
# PostgreSQL administrative account
12+
13+
ENV NAME=postgresql \
14+
VERSION=0 \
15+
ARCH=x86_64 \
16+
\
17+
POSTGRESQL_VERSION=12 \
18+
POSTGRESQL_PREV_VERSION=10 \
19+
HOME=/var/lib/pgsql \
20+
PGUSER=postgres \
21+
APP_DATA=/opt/app-root
22+
23+
ENV SUMMARY="PostgreSQL is an advanced Object-Relational database management system" \
24+
DESCRIPTION="PostgreSQL is an advanced Object-Relational database management system (DBMS). \
25+
The image contains the client and server programs that you'll need to \
26+
create, run, maintain and access a PostgreSQL DBMS server."
27+
28+
LABEL summary="$SUMMARY" \
29+
description="$DESCRIPTION" \
30+
io.k8s.description="$DESCRIPTION" \
31+
io.k8s.display-name="PostgreSQL 12" \
32+
io.openshift.expose-services="5432:postgresql" \
33+
io.openshift.tags="database,postgresql,postgresql12" \
34+
com.redhat.component="$NAME" \
35+
maintainer="SoftwareCollections.org <sclorg@redhat.com>" \
36+
name="fedora/$NAME-12" \
37+
version="0" \
38+
usage="docker run -d --name postgresql_database -e POSTGRESQL_USER=user -e POSTGRESQL_PASSWORD=pass -e POSTGRESQL_DATABASE=db -p 5432:5432 quay.io/fedora/$NAME-12"
39+
40+
EXPOSE 5432
41+
42+
COPY root/usr/libexec/fix-permissions /usr/libexec/fix-permissions
43+
44+
# This image must forever use UID 26 for postgres user so our volumes are
45+
# safe in the future. This should *never* change, the last test is there
46+
# to make sure of that.
47+
RUN INSTALL_PKGS="rsync tar gettext bind-utils postgresql-server postgresql-contrib nss_wrapper " && \
48+
INSTALL_PKGS+="findutils xz" && \
49+
INSTALL_PKGS+=" pgaudit" && \
50+
dnf -y module enable postgresql:12 && \
51+
dnf -y --setopt=tsflags=nodocs install $INSTALL_PKGS && \
52+
rpm -V $INSTALL_PKGS && \
53+
dnf clean all && \
54+
test "$(id postgres)" = "uid=26(postgres) gid=26(postgres) groups=26(postgres)" && \
55+
mkdir -p /var/lib/pgsql/data && \
56+
/usr/libexec/fix-permissions /var/lib/pgsql /var/run/postgresql
57+
58+
# Get prefix path and path to scripts rather than hard-code them in scripts
59+
ENV CONTAINER_SCRIPTS_PATH=/usr/share/container-scripts/postgresql
60+
61+
COPY root /
62+
COPY ./s2i/bin/ $STI_SCRIPTS_PATH
63+
64+
VOLUME ["/var/lib/pgsql/data"]
65+
66+
# S2I permission fixes
67+
# --------------------
68+
# 1. unless specified otherwise (or - equivalently - we are in OpenShift), s2i
69+
# build process would be executed as 'uid=26(postgres) gid=26(postgres)'.
70+
# Such process wouldn't be able to execute the default 'assemble' script
71+
# correctly (it transitively executes 'fix-permissions' script). So let's
72+
# add the 'postgres' user into 'root' group here
73+
#
74+
# 2. we call fix-permissions on $APP_DATA here directly (UID=0 during build
75+
# anyways) to assure that s2i process is actually able to _read_ the
76+
# user-specified scripting.
77+
RUN usermod -a -G root postgres && \
78+
/usr/libexec/fix-permissions --read-only "$APP_DATA"
79+
80+
USER 26
81+
82+
ENTRYPOINT ["container-entrypoint"]
83+
CMD ["run-postgresql"]

13/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
./Dockerfile.centos7

13/Dockerfile.centos7

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
FROM quay.io/centos7/s2i-core-centos7
2+
3+
# PostgreSQL image for OpenShift.
4+
# Volumes:
5+
# * /var/lib/pgsql/data - Database cluster for PostgreSQL
6+
# Environment:
7+
# * $POSTGRESQL_USER - Database user name
8+
# * $POSTGRESQL_PASSWORD - User's password
9+
# * $POSTGRESQL_DATABASE - Name of the database to create
10+
# * $POSTGRESQL_ADMIN_PASSWORD (Optional) - Password for the 'postgres'
11+
# PostgreSQL administrative account
12+
13+
ENV POSTGRESQL_VERSION=13 \
14+
POSTGRESQL_PREV_VERSION=12 \
15+
HOME=/var/lib/pgsql \
16+
PGUSER=postgres \
17+
APP_DATA=/opt/app-root
18+
19+
ENV SUMMARY="PostgreSQL is an advanced Object-Relational database management system" \
20+
DESCRIPTION="PostgreSQL is an advanced Object-Relational database management system (DBMS). \
21+
The image contains the client and server programs that you'll need to \
22+
create, run, maintain and access a PostgreSQL DBMS server."
23+
24+
LABEL summary="$SUMMARY" \
25+
description="$DESCRIPTION" \
26+
io.k8s.description="$DESCRIPTION" \
27+
io.k8s.display-name="PostgreSQL 13" \
28+
io.openshift.expose-services="5432:postgresql" \
29+
io.openshift.tags="database,postgresql,postgresql13,rh-postgresql13" \
30+
io.openshift.s2i.assemble-user="26" \
31+
name="centos7/postgresql-13-centos7" \
32+
com.redhat.component="rh-postgresql13-container" \
33+
version="1" \
34+
usage="podman run -d --name postgresql_database -e POSTGRESQL_USER=user -e POSTGRESQL_PASSWORD=pass -e POSTGRESQL_DATABASE=db -p 5432:5432 centos7/postgresql-13-centos7" \
35+
maintainer="SoftwareCollections.org <sclorg@redhat.com>"
36+
37+
EXPOSE 5432
38+
39+
COPY root/usr/libexec/fix-permissions /usr/libexec/fix-permissions
40+
41+
# This image must forever use UID 26 for postgres user so our volumes are
42+
# safe in the future. This should *never* change, the last test is there
43+
# to make sure of that.
44+
RUN yum install -y centos-release-scl-rh && \
45+
INSTALL_PKGS="rsync tar gettext bind-utils nss_wrapper rh-postgresql13 rh-postgresql13-postgresql-contrib rh-postgresql13-syspaths rh-postgresql12-postgresql-server" && \
46+
INSTALL_PKGS="$INSTALL_PKGS rh-postgresql13-pgaudit" && \
47+
yum -y --setopt=tsflags=nodocs install $INSTALL_PKGS && \
48+
rpm -V $INSTALL_PKGS && \
49+
yum -y clean all --enablerepo='*' && \
50+
localedef -f UTF-8 -i en_US en_US.UTF-8 && \
51+
test "$(id postgres)" = "uid=26(postgres) gid=26(postgres) groups=26(postgres)" && \
52+
mkdir -p /var/lib/pgsql/data && \
53+
/usr/libexec/fix-permissions /var/lib/pgsql /var/run/postgresql
54+
55+
# Get prefix path and path to scripts rather than hard-code them in scripts
56+
ENV CONTAINER_SCRIPTS_PATH=/usr/share/container-scripts/postgresql \
57+
ENABLED_COLLECTIONS=rh-postgresql13
58+
59+
COPY root /
60+
COPY ./s2i/bin/ $STI_SCRIPTS_PATH
61+
62+
# When bash is started non-interactively, to run a shell script, for example it
63+
# looks for this variable and source the content of this file. This will enable
64+
# the SCL for all scripts without need to do 'scl enable'.
65+
ENV BASH_ENV=${CONTAINER_SCRIPTS_PATH}/scl_enable \
66+
ENV=${CONTAINER_SCRIPTS_PATH}/scl_enable \
67+
PROMPT_COMMAND=". ${CONTAINER_SCRIPTS_PATH}/scl_enable"
68+
69+
# Not using VOLUME statement since it's not working in OpenShift Online:
70+
# https://github.com/sclorg/httpd-container/issues/30
71+
# VOLUME ["/var/lib/pgsql/data"]
72+
73+
# S2I permission fixes
74+
# --------------------
75+
# 1. unless specified otherwise (or - equivalently - we are in OpenShift), s2i
76+
# build process would be executed as 'uid=26(postgres) gid=26(postgres)'.
77+
# Such process wouldn't be able to execute the default 'assemble' script
78+
# correctly (it transitively executes 'fix-permissions' script). So let's
79+
# add the 'postgres' user into 'root' group here
80+
#
81+
# 2. we call fix-permissions on $APP_DATA here directly (UID=0 during build
82+
# anyways) to assure that s2i process is actually able to _read_ the
83+
# user-specified scripting.
84+
RUN usermod -a -G root postgres && \
85+
/usr/libexec/fix-permissions --read-only "$APP_DATA"
86+
87+
USER 26
88+
89+
ENTRYPOINT ["container-entrypoint"]
90+
CMD ["run-postgresql"]

13/Dockerfile.fedora

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
FROM quay.io/fedora/s2i-core:35
2+
3+
# PostgreSQL image for OpenShift.
4+
# Volumes:
5+
# * /var/lib/psql/data - Database cluster for PostgreSQL
6+
# Environment:
7+
# * $POSTGRESQL_USER - Database user name
8+
# * $POSTGRESQL_PASSWORD - User's password
9+
# * $POSTGRESQL_DATABASE - Name of the database to create
10+
# * $POSTGRESQL_ADMIN_PASSWORD (Optional) - Password for the 'postgres'
11+
# PostgreSQL administrative account
12+
13+
ENV NAME=postgresql \
14+
VERSION=0 \
15+
ARCH=x86_64 \
16+
\
17+
POSTGRESQL_VERSION=13 \
18+
POSTGRESQL_PREV_VERSION=12 \
19+
HOME=/var/lib/pgsql \
20+
PGUSER=postgres \
21+
APP_DATA=/opt/app-root
22+
23+
ENV SUMMARY="PostgreSQL is an advanced Object-Relational database management system" \
24+
DESCRIPTION="PostgreSQL is an advanced Object-Relational database management system (DBMS). \
25+
The image contains the client and server programs that you'll need to \
26+
create, run, maintain and access a PostgreSQL DBMS server."
27+
28+
LABEL summary="$SUMMARY" \
29+
description="$DESCRIPTION" \
30+
io.k8s.description="$DESCRIPTION" \
31+
io.k8s.display-name="PostgreSQL 13" \
32+
io.openshift.expose-services="5432:postgresql" \
33+
io.openshift.tags="database,postgresql,postgresql13" \
34+
com.redhat.component="$NAME" \
35+
maintainer="SoftwareCollections.org <sclorg@redhat.com>" \
36+
name="fedora/$NAME-13" \
37+
version="0" \
38+
usage="docker run -d --name postgresql_database -e POSTGRESQL_USER=user -e POSTGRESQL_PASSWORD=pass -e POSTGRESQL_DATABASE=db -p 5432:5432 quay.io/fedora/$NAME-13"
39+
40+
EXPOSE 5432
41+
42+
COPY root/usr/libexec/fix-permissions /usr/libexec/fix-permissions
43+
44+
# This image must forever use UID 26 for postgres user so our volumes are
45+
# safe in the future. This should *never* change, the last test is there
46+
# to make sure of that.
47+
RUN INSTALL_PKGS="rsync tar gettext bind-utils postgresql-server postgresql-contrib nss_wrapper " && \
48+
INSTALL_PKGS+="findutils xz" && \
49+
INSTALL_PKGS+=" pgaudit" && \
50+
dnf -y module enable postgresql:13 && \
51+
dnf -y --setopt=tsflags=nodocs install $INSTALL_PKGS && \
52+
rpm -V $INSTALL_PKGS && \
53+
dnf clean all && \
54+
test "$(id postgres)" = "uid=26(postgres) gid=26(postgres) groups=26(postgres)" && \
55+
mkdir -p /var/lib/pgsql/data && \
56+
/usr/libexec/fix-permissions /var/lib/pgsql /var/run/postgresql
57+
58+
# Get prefix path and path to scripts rather than hard-code them in scripts
59+
ENV CONTAINER_SCRIPTS_PATH=/usr/share/container-scripts/postgresql
60+
61+
COPY root /
62+
COPY ./s2i/bin/ $STI_SCRIPTS_PATH
63+
64+
VOLUME ["/var/lib/pgsql/data"]
65+
66+
# S2I permission fixes
67+
# --------------------
68+
# 1. unless specified otherwise (or - equivalently - we are in OpenShift), s2i
69+
# build process would be executed as 'uid=26(postgres) gid=26(postgres)'.
70+
# Such process wouldn't be able to execute the default 'assemble' script
71+
# correctly (it transitively executes 'fix-permissions' script). So let's
72+
# add the 'postgres' user into 'root' group here
73+
#
74+
# 2. we call fix-permissions on $APP_DATA here directly (UID=0 during build
75+
# anyways) to assure that s2i process is actually able to _read_ the
76+
# user-specified scripting.
77+
RUN usermod -a -G root postgres && \
78+
/usr/libexec/fix-permissions --read-only "$APP_DATA"
79+
80+
USER 26
81+
82+
ENTRYPOINT ["container-entrypoint"]
83+
CMD ["run-postgresql"]

0 commit comments

Comments
 (0)