diff --git a/Dockerfile b/Dockerfile index 07ea69c..c5b2e56 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM centos:centos7 +FROM fedora:25 # PostgreSQL image for OpenShift. # Volumes: @@ -10,8 +10,6 @@ FROM centos:centos7 # * $POSTGRESQL_ADMIN_PASSWORD (Optional) - Password for the 'postgres' # PostgreSQL administrative account -MAINTAINER SoftwareCollections.org - ENV POSTGRESQL_VERSION=9.5 \ HOME=/var/lib/pgsql \ PGUSER=postgres @@ -19,7 +17,8 @@ ENV POSTGRESQL_VERSION=9.5 \ LABEL io.k8s.description="PostgreSQL is an advanced Object-Relational database management system" \ io.k8s.display-name="PostgreSQL 9.5" \ io.openshift.expose-services="5432:postgresql" \ - io.openshift.tags="database,postgresql,postgresql95,rh-postgresql95" + io.openshift.tags="database,postgresql,postgresql95" \ + maintainer="Pavel Raiskup " EXPOSE 5432 @@ -28,27 +27,18 @@ ADD root / # This image must forever use UID 26 for postgres user so our volumes are # safe in the future. This should *never* change, the last test is there # to make sure of that. -RUN yum install -y centos-release-scl-rh && \ - INSTALL_PKGS="rsync tar gettext bind-utils rh-postgresql95 rh-postgresql95-postgresql-contrib nss_wrapper" && \ - yum -y --setopt=tsflags=nodocs install $INSTALL_PKGS && \ +RUN INSTALL_PKGS="rsync tar gettext bind-utils postgresql-server postgresql-contrib nss_wrapper " && \ + INSTALL_PKGS+="findutils python " && \ + dnf -y --setopt=tsflags=nodocs install $INSTALL_PKGS && \ rpm -V $INSTALL_PKGS && \ - yum clean all && \ - localedef -f UTF-8 -i en_US en_US.UTF-8 && \ + dnf clean all && \ test "$(id postgres)" = "uid=26(postgres) gid=26(postgres) groups=26(postgres)" && \ mkdir -p /var/lib/pgsql/data && \ /usr/libexec/fix-permissions /var/lib/pgsql && \ /usr/libexec/fix-permissions /var/run/postgresql # Get prefix path and path to scripts rather than hard-code them in scripts -ENV CONTAINER_SCRIPTS_PATH=/usr/share/container-scripts/postgresql \ - ENABLED_COLLECTIONS=rh-postgresql95 - -# When bash is started non-interactively, to run a shell script, for example it -# looks for this variable and source the content of this file. This will enable -# the SCL for all scripts without need to do 'scl enable'. -ENV BASH_ENV=${CONTAINER_SCRIPTS_PATH}/scl_enable \ - ENV=${CONTAINER_SCRIPTS_PATH}/scl_enable \ - PROMPT_COMMAND=". ${CONTAINER_SCRIPTS_PATH}/scl_enable" +ENV CONTAINER_SCRIPTS_PATH=/usr/share/container-scripts/postgresql VOLUME ["/var/lib/pgsql/data"] diff --git a/root/usr/share/container-scripts/postgresql/scl_enable b/root/usr/share/container-scripts/postgresql/scl_enable deleted file mode 100644 index 1d967f9..0000000 --- a/root/usr/share/container-scripts/postgresql/scl_enable +++ /dev/null @@ -1,3 +0,0 @@ -# This will make scl collection binaries work out of box. -unset BASH_ENV PROMPT_COMMAND ENV -source scl_source enable $ENABLED_COLLECTIONS