diff --git a/Dockerfile b/Dockerfile index a0d7f16bd68cff139e5cbd82dc7999877affc203..72bc95f89fcc0f3e74b58d9b9b154d3e6172ca87 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,19 +1,15 @@ # A FROM line must be present but is ignored. It will be overridden by the --image-stream parameter in the buildConfig FROM centos/php-73-centos7 + # Temporarily switch to root user to install packages USER root + # Install PHP dependencies RUN yum install -y \ - epel-release -RUN yum install -y \ - php-imap +- epel-release -# Fix php-imap location -RUN cp /etc/php.d/imap.ini /etc/opt/rh/rh-php73/php.d/20-imap.ini -RUN cp /etc/php.d/imap.ini \ - /opt/rh/rh-php73/register.content/etc/opt/rh/rh-php73/php.d/20-imap.ini -RUN cp /usr/lib64/php/modules/imap.so \ - /opt/rh/rh-php73/root/usr/lib64/php/modules/imap.so +RUN yum install -y \ + rh-php73-php-imap # Make sure the final image runs as unprivileged user USER 1001 diff --git a/README.md b/README.md index dca9ffcb5dfa38eed4a249419b570c1e3786bc1d..dacd5ad38f25e3b9926ada638a7da2d9c757ca29 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ We need to add some missing packages so we follow the procedure at It is just using the `centos/php-73-centos7` S2I builder and checking out Z-Push from a submodule. -## Create the custom builder +## Create the custom builder (first time only) This is using the top-level `Dockerfile`. @@ -26,11 +26,7 @@ oc new-build \ --strategy=docker https://gitlab.cern.ch/mail/zpush-openshift.git ``` -## Update the custom builder - -TODO - -## Create an app based on the custom builder +## Create an app based on the custom builder (first time only) For `test`: ``` @@ -46,6 +42,20 @@ oc new-app \ --context-dir=Z-Push/src --name zpush ``` +## Re-build the custom builder + +``` +oc start-build zpush-builder +oc logs -f bc/zpush-builder +``` + +## Re-build the app image + +``` +oc start-build zpush +oc logs -f bc/zpush +``` + ## DC configuration A few volumes are needed: