diff --git a/docker/roundcube/Dockerfile b/docker/roundcube/Dockerfile index 1aaca577..46cc0d33 100644 --- a/docker/roundcube/Dockerfile +++ b/docker/roundcube/Dockerfile @@ -1,128 +1,131 @@ FROM apheleia/almalinux9 ENV HOME=/opt/app-root/src # Add kolab RUN rpm --import https://mirror.apheleia-it.ch/repos/Kolab:/16/key.asc && \ rpm -Uvh https://mirror.apheleia-it.ch/repos/Kolab:/16/kolab-16-for-el9.rpm # Install php modules RUN sed -i -e '/^ssl/d' /etc/yum.repos.d/kolab*.repo && \ dnf config-manager --enable kolab-16 &&\ dnf -y --setopt=install_weak_deps=False --setopt tsflags= install php-kolab php-kolabformat \ composer \ diffutils \ file \ git \ make \ unzip \ curl-minimal \ mariadb \ which \ rsync \ openssl \ httpd \ patch \ php-cli \ php-common \ php-ldap \ php-opcache \ php-pecl-apcu \ php-mysqlnd \ php-gd \ php-fpm \ php-pear \ php-redis \ ImageMagick \ re2c \ npm \ wget && \ dnf clean all RUN npm install -g less less-plugin-clean-css WORKDIR ${HOME} COPY rootfs/opt/app-root/src/build.sh /opt/app-root/src/ COPY rootfs/opt/app-root/src/update.sh /opt/app-root/src/ COPY rootfs/opt/app-root/src/composer.json /opt/app-root/src/ COPY rootfs/opt/app-root/src/roundcubemail-config-templates /opt/app-root/src/roundcubemail-config-templates ARG GIT_REF_ROUNDCUBEMAIL=dev/kolab-1.5 ARG GIT_REMOTE_ROUNDCUBEMAIL=https://git.kolab.org/source/roundcubemail.git ARG GIT_REF_ROUNDCUBEMAIL_PLUGINS=master ARG GIT_REMOTE_ROUNDCUBEMAIL_PLUGINS=https://git.kolab.org/diffusion/RPK/roundcubemail-plugins-kolab.git ARG GIT_REF_CHWALA=master ARG GIT_REMOTE_CHWALA=https://git.kolab.org/diffusion/C/chwala.git ARG GIT_REF_SYNCROTON=master ARG GIT_REMOTE_SYNCROTON=https://git.kolab.org/diffusion/S/syncroton.git ARG GIT_REF_AUTOCONF=master ARG GIT_REMOTE_AUTOCONF=https://git.kolab.org/diffusion/AC/autoconf.git ARG GIT_REF_IRONY=master ARG GIT_REMOTE_IRONY=https://git.kolab.org/source/iRony.git ARG GIT_REF_FREEBUSY=master ARG GIT_REMOTE_FREEBUSY=https://git.kolab.org/diffusion/F/freebusy.git +ARG GIT_REMOTE_SKIN_ELASTIC="" +ARG GIT_REF_SKIN_ELASTIC=master +ARG SKINS=kolab RUN /opt/app-root/src/build.sh && \ for PATH in /run/php-fpm /run/httpd /var/log/httpd /var/lib/httpd /data /opt/app-root; \ do \ /usr/bin/mkdir -p $PATH; \ /usr/bin/chmod -R 777 $PATH; \ /usr/bin/chown -R 1001:0 $PATH; \ /usr/bin/chmod -R g=u $PATH; \ done COPY /rootfs / RUN chmod 777 /opt/app-root/src RUN chmod -R 777 /etc/php.ini /etc/httpd /opt/app-root/src/*.sh VOLUME /data ENV RUN_MIGRATIONS=true ENV KOLABOBJECTS_COMPAT_MODE=false ENV LOGDRIVER=logfmt ENV SKIN=kolab # ENV FILEAPI_KOLABFILES_BASEURI= # ENV FILEAPI_WOPI_OFFICE= # ENV FILE_API_URL= # ENV FILE_API_SERVER_URL= # ENV CALENDAR_CALDAV_SERVER= # ENV TASKLIST_CALDAV_SERVER= # ENV KOLAB_ADDRESSBOOK_CARDDAV_SERVER= # ENV KOLAB_FILES_URL= # ENV KOLAB_FILES_SERVER_URL= # ENV IMAP_HOST= # ENV IMAP_PORT= # ENV IMAP_TLS= # ENV IMAP_PROXY_PROTOCOL= # ENV IMAP_ADMIN_LOGIN= # ENV IMAP_ADMIN_PASSWORD= # ENV DB_RC_USERNAME= # ENV DB_RC_PASSWORD= # ENV DB_RC_DATABASE= # ENV DB_HOST= # ENV DES_KEY= # ENV APP_DOMAIN= # ENV PROXY_WHITELIST= # ENV SUBMISSION_HOST= # ENV SUBMISSION_PORT= # ENV SUBMISSION_ENCRYPTION= # ENV DISABLED_PLUGINS= # ENV EXTRA_PLUGINS= # ENV SQL_DEBUG= # ENV MEMCACHE_DEBUG= # ENV IMAP_DEBUG= # ENV SMTP_DEBUG= # ENV DAV_DEBUG= # ENV ACTIVESYNC_DEBUG= # ENV REDIS_HOST= # ENV REDIS_PASSWORD= USER 1001 EXPOSE 8080 # https://httpd.apache.org/docs/2.4/stopping.html#gracefulstop STOPSIGNAL SIGWINCH CMD [ "/opt/app-root/src/init.sh" ] diff --git a/docker/roundcube/rootfs/opt/app-root/src/build.sh b/docker/roundcube/rootfs/opt/app-root/src/build.sh index bc58a9da..0287dd35 100755 --- a/docker/roundcube/rootfs/opt/app-root/src/build.sh +++ b/docker/roundcube/rootfs/opt/app-root/src/build.sh @@ -1,50 +1,53 @@ #!/bin/bash set -e set -x pushd /opt/app-root/src/ function checkout() { if [ ! -d "$1" ]; then git clone "$2" "$1" pushd "$1" git checkout "$3" rm -rf .git popd fi } -# Clone what we don't find (roundcubemail-skin-elastic is not publicly available, so can't be included this way) +# Clone what we don't find checkout roundcubemail $GIT_REMOTE_ROUNDCUBEMAIL $GIT_REF_ROUNDCUBEMAIL checkout roundcubemail-plugins-kolab $GIT_REMOTE_ROUNDCUBEMAIL_PLUGINS $GIT_REF_ROUNDCUBEMAIL_PLUGINS checkout syncroton $GIT_REMOTE_SYNCROTON $GIT_REF_SYNCROTON checkout iRony $GIT_REMOTE_IRONY $GIT_REF_IRONY checkout chwala $GIT_REMOTE_CHWALA $GIT_REF_CHWALA checkout autoconf $GIT_REMOTE_AUTOCONF $GIT_REF_AUTOCONF checkout freebusy $GIT_REMOTE_FREEBUSY $GIT_REF_FREEBUSY +if [[ "$GIT_REMOTE_SKIN_ELASTIC" != "" ]]; then + checkout roundcubemail-skin-elastic $GIT_REMOTE_SKIN_ELASTIC $GIT_REF_SKIN_ELASTIC +fi pushd roundcubemail cp /opt/app-root/src/composer.json composer.json rm -rf vendor/ composer.lock env COMPOSER_ALLOW_SUPERUSER=1 php -dmemory_limit=-1 $(command -v composer) install popd ./update.sh pushd roundcubemail # Adjust the configs sed -i -r \ -e "s/'vlv'(\s+)=> false,/'vlv'\1=> true,/g" \ -e "s/'vlv_search'(\s+)=> false,/'vlv_search'\1=> true,/g" \ -e "s/inetOrgPerson/inetorgperson/g" \ -e "s/kolabInetOrgPerson/inetorgperson/g" \ config/*.inc.php sed -i -r -e "s|\$config\['managesieve_host'\] = .*$|\$config['managesieve_host'] = 'kolab';|g" config/managesieve.inc.php popd # Set the php timezone sed -i -r -e 's|^(;*)date\.timezone.*$|date.timezone = Europe/Zurich|g' /etc/php.ini # Allow environment variables from fpm sed -i -e "s/;clear_env/clear_env/" /etc/php-fpm.d/www.conf