Skip to content

Commit 810759b

Browse files
frenzymadnesszmiklank
authored andcommitted
Add version 10, previously ignored by .gitignore
1 parent 4b4994a commit 810759b

24 files changed

+1423
-0
lines changed

10/Dockerfile.c8s

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
FROM quay.io/sclorg/s2i-core-c8s:c8s
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=10 \
14+
POSTGRESQL_PREV_VERSION=9.6 \
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 10" \
28+
io.openshift.expose-services="5432:postgresql" \
29+
io.openshift.tags="database,postgresql,postgresql10,postgresql-10" \
30+
io.openshift.s2i.assemble-user="26" \
31+
name="sclorg/postgresql-10-c8s" \
32+
com.redhat.component="postgresql-10-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 sclorg/postgresql-10-c8s" \
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 -y module enable postgresql:10 && \
45+
INSTALL_PKGS="rsync tar gettext bind-utils nss_wrapper postgresql-server postgresql-contrib" && \
46+
yum -y --setopt=tsflags=nodocs install $INSTALL_PKGS && \
47+
rpm -V $INSTALL_PKGS && \
48+
yum -y reinstall tzdata && \
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=
58+
59+
COPY root /
60+
COPY ./s2i/bin/ $STI_SCRIPTS_PATH
61+
62+
# Not using VOLUME statement since it's not working in OpenShift Online:
63+
# https://github.com/sclorg/httpd-container/issues/30
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"]

10/Dockerfile.centos7

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
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=10 \
14+
POSTGRESQL_PREV_VERSION=9.6 \
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 10" \
28+
io.openshift.expose-services="5432:postgresql" \
29+
io.openshift.tags="database,postgresql,postgresql10,rh-postgresql10" \
30+
io.openshift.s2i.assemble-user="26" \
31+
name="centos7/postgresql-10-centos7" \
32+
com.redhat.component="rh-postgresql10-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-10-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-postgresql10 rh-postgresql10-postgresql-contrib rh-postgresql10-syspaths rh-postgresql96-postgresql-server" && \
46+
yum -y --setopt=tsflags=nodocs install $INSTALL_PKGS && \
47+
rpm -V $INSTALL_PKGS && \
48+
yum -y clean all --enablerepo='*' && \
49+
localedef -f UTF-8 -i en_US en_US.UTF-8 && \
50+
test "$(id postgres)" = "uid=26(postgres) gid=26(postgres) groups=26(postgres)" && \
51+
mkdir -p /var/lib/pgsql/data && \
52+
/usr/libexec/fix-permissions /var/lib/pgsql /var/run/postgresql
53+
54+
# Get prefix path and path to scripts rather than hard-code them in scripts
55+
ENV CONTAINER_SCRIPTS_PATH=/usr/share/container-scripts/postgresql \
56+
ENABLED_COLLECTIONS=rh-postgresql10
57+
58+
COPY root /
59+
COPY ./s2i/bin/ $STI_SCRIPTS_PATH
60+
61+
# When bash is started non-interactively, to run a shell script, for example it
62+
# looks for this variable and source the content of this file. This will enable
63+
# the SCL for all scripts without need to do 'scl enable'.
64+
ENV BASH_ENV=${CONTAINER_SCRIPTS_PATH}/scl_enable \
65+
ENV=${CONTAINER_SCRIPTS_PATH}/scl_enable \
66+
PROMPT_COMMAND=". ${CONTAINER_SCRIPTS_PATH}/scl_enable"
67+
68+
# Not using VOLUME statement since it's not working in OpenShift Online:
69+
# https://github.com/sclorg/httpd-container/issues/30
70+
# VOLUME ["/var/lib/pgsql/data"]
71+
72+
# S2I permission fixes
73+
# --------------------
74+
# 1. unless specified otherwise (or - equivalently - we are in OpenShift), s2i
75+
# build process would be executed as 'uid=26(postgres) gid=26(postgres)'.
76+
# Such process wouldn't be able to execute the default 'assemble' script
77+
# correctly (it transitively executes 'fix-permissions' script). So let's
78+
# add the 'postgres' user into 'root' group here
79+
#
80+
# 2. we call fix-permissions on $APP_DATA here directly (UID=0 during build
81+
# anyways) to assure that s2i process is actually able to _read_ the
82+
# user-specified scripting.
83+
RUN usermod -a -G root postgres && \
84+
/usr/libexec/fix-permissions --read-only "$APP_DATA"
85+
86+
USER 26
87+
88+
ENTRYPOINT ["container-entrypoint"]
89+
CMD ["run-postgresql"]

10/Dockerfile.rhel7

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
FROM rhscl/s2i-core-rhel7
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=10 \
14+
POSTGRESQL_PREV_VERSION=9.6 \
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 10" \
28+
io.openshift.expose-services="5432:postgresql" \
29+
io.openshift.tags="database,postgresql,postgresql10,rh-postgresql10" \
30+
io.openshift.s2i.assemble-user="26" \
31+
name="rhscl/postgresql-10-rhel7" \
32+
com.redhat.component="rh-postgresql10-container" \
33+
version="1" \
34+
com.redhat.license_terms="https://www.redhat.com/en/about/red-hat-end-user-license-agreements#rhel" \
35+
usage="podman run -d --name postgresql_database -e POSTGRESQL_USER=user -e POSTGRESQL_PASSWORD=pass -e POSTGRESQL_DATABASE=db -p 5432:5432 rhscl/postgresql-10-rhel7" \
36+
maintainer="SoftwareCollections.org <sclorg@redhat.com>"
37+
38+
EXPOSE 5432
39+
40+
COPY root/usr/libexec/fix-permissions /usr/libexec/fix-permissions
41+
42+
# This image must forever use UID 26 for postgres user so our volumes are
43+
# safe in the future. This should *never* change, the last test is there
44+
# to make sure of that.
45+
# rhel-7-server-ose-3.2-rpms is enabled for nss_wrapper until this pkg is
46+
# in base RHEL
47+
RUN yum install -y yum-utils gettext && \
48+
prepare-yum-repositories rhel-server-rhscl-7-rpms && \
49+
INSTALL_PKGS="rsync tar gettext bind-utils nss_wrapper rh-postgresql10 rh-postgresql10-postgresql-contrib rh-postgresql10-syspaths rh-postgresql96-postgresql-server" && \
50+
yum -y --setopt=tsflags=nodocs install $INSTALL_PKGS && \
51+
rpm -V $INSTALL_PKGS && \
52+
yum -y clean all --enablerepo='*' && \
53+
localedef -f UTF-8 -i en_US en_US.UTF-8 && \
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+
ENABLED_COLLECTIONS=rh-postgresql10
61+
62+
COPY root /
63+
COPY ./s2i/bin/ $STI_SCRIPTS_PATH
64+
65+
# When bash is started non-interactively, to run a shell script, for example it
66+
# looks for this variable and source the content of this file. This will enable
67+
# the SCL for all scripts without need to do 'scl enable'.
68+
ENV BASH_ENV=${CONTAINER_SCRIPTS_PATH}/scl_enable \
69+
ENV=${CONTAINER_SCRIPTS_PATH}/scl_enable \
70+
PROMPT_COMMAND=". ${CONTAINER_SCRIPTS_PATH}/scl_enable"
71+
72+
# Not using VOLUME statement since it's not working in OpenShift Online:
73+
# https://github.com/sclorg/httpd-container/issues/30
74+
# VOLUME ["/var/lib/pgsql/data"]
75+
76+
# S2I permission fixes
77+
# --------------------
78+
# 1. unless specified otherwise (or - equivalently - we are in OpenShift), s2i
79+
# build process would be executed as 'uid=26(postgres) gid=26(postgres)'.
80+
# Such process wouldn't be able to execute the default 'assemble' script
81+
# correctly (it transitively executes 'fix-permissions' script). So let's
82+
# add the 'postgres' user into 'root' group here
83+
#
84+
# 2. we call fix-permissions on $APP_DATA here directly (UID=0 during build
85+
# anyways) to assure that s2i process is actually able to _read_ the
86+
# user-specified scripting.
87+
RUN usermod -a -G root postgres && \
88+
/usr/libexec/fix-permissions --read-only "$APP_DATA"
89+
90+
USER 26
91+
92+
ENTRYPOINT ["container-entrypoint"]
93+
CMD ["run-postgresql"]

10/Dockerfile.rhel8

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
FROM ubi8/s2i-core
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=10 \
14+
POSTGRESQL_PREV_VERSION=9.6 \
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 10" \
28+
io.openshift.expose-services="5432:postgresql" \
29+
io.openshift.tags="database,postgresql,postgresql10,postgresql-10" \
30+
io.openshift.s2i.assemble-user="26" \
31+
name="rhel8/postgresql-10" \
32+
com.redhat.component="postgresql-10-container" \
33+
version="1" \
34+
com.redhat.license_terms="https://www.redhat.com/en/about/red-hat-end-user-license-agreements#rhel" \
35+
usage="podman run -d --name postgresql_database -e POSTGRESQL_USER=user -e POSTGRESQL_PASSWORD=pass -e POSTGRESQL_DATABASE=db -p 5432:5432 rhel8/postgresql-10" \
36+
maintainer="SoftwareCollections.org <sclorg@redhat.com>"
37+
38+
EXPOSE 5432
39+
40+
COPY root/usr/libexec/fix-permissions /usr/libexec/fix-permissions
41+
42+
# This image must forever use UID 26 for postgres user so our volumes are
43+
# safe in the future. This should *never* change, the last test is there
44+
# to make sure of that.
45+
RUN yum -y module enable postgresql:10 && \
46+
INSTALL_PKGS="rsync tar gettext bind-utils nss_wrapper postgresql-server postgresql-contrib" && \
47+
yum -y --setopt=tsflags=nodocs install $INSTALL_PKGS && \
48+
rpm -V $INSTALL_PKGS && \
49+
yum -y reinstall tzdata && \
50+
yum -y clean all --enablerepo='*' && \
51+
localedef -f UTF-8 -i en_US en_US.UTF-8 && \
52+
test "$(id postgres)" = "uid=26(postgres) gid=26(postgres) groups=26(postgres)" && \
53+
mkdir -p /var/lib/pgsql/data && \
54+
/usr/libexec/fix-permissions /var/lib/pgsql /var/run/postgresql
55+
56+
# Get prefix path and path to scripts rather than hard-code them in scripts
57+
ENV CONTAINER_SCRIPTS_PATH=/usr/share/container-scripts/postgresql \
58+
ENABLED_COLLECTIONS=
59+
60+
COPY root /
61+
COPY ./s2i/bin/ $STI_SCRIPTS_PATH
62+
63+
# Not using VOLUME statement since it's not working in OpenShift Online:
64+
# https://github.com/sclorg/httpd-container/issues/30
65+
# VOLUME ["/var/lib/pgsql/data"]
66+
67+
# S2I permission fixes
68+
# --------------------
69+
# 1. unless specified otherwise (or - equivalently - we are in OpenShift), s2i
70+
# build process would be executed as 'uid=26(postgres) gid=26(postgres)'.
71+
# Such process wouldn't be able to execute the default 'assemble' script
72+
# correctly (it transitively executes 'fix-permissions' script). So let's
73+
# add the 'postgres' user into 'root' group here
74+
#
75+
# 2. we call fix-permissions on $APP_DATA here directly (UID=0 during build
76+
# anyways) to assure that s2i process is actually able to _read_ the
77+
# user-specified scripting.
78+
RUN usermod -a -G root postgres && \
79+
/usr/libexec/fix-permissions --read-only "$APP_DATA"
80+
81+
USER 26
82+
83+
ENTRYPOINT ["container-entrypoint"]
84+
CMD ["run-postgresql"]

10/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
root/usr/share/container-scripts/postgresql/README.md

10/content_sets.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# This is a file defining which content sets are needed to update content in
2+
# this image. Data provided here helps determine which images are vulnerable to
3+
# specific CVEs. Generally you should only need to update this file when:
4+
# 1. You start depending on new product
5+
# 2. You are preparing new product release and your content sets will change
6+
---
7+
x86_64:
8+
- rhel-7-server-rpms
9+
- rhel-7-server-optional-rpms
10+
- rhel-server-rhscl-7-rpms

10/root/usr/bin/container-entrypoint

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/bash
2+
3+
exec "$@"

0 commit comments

Comments
 (0)