diff --git a/docker/swoole/Dockerfile b/docker/swoole/Dockerfile index 845f9ad4..9d36f87e 100644 --- a/docker/swoole/Dockerfile +++ b/docker/swoole/Dockerfile @@ -1,79 +1,81 @@ FROM apheleia/almalinux9 ARG SWOOLE_VERSION=v5.1.2 ENV HOME=/opt/app-root/src RUN dnf module reset php && \ dnf module -y enable php:8.1 && \ dnf module -y enable nodejs:20 && \ dnf -y install \ --setopt=install_weak_deps=False \ --setopt 'tsflags=nodocs' \ composer \ diffutils \ file \ git \ make \ npm \ openssl-devel \ openssl \ patch \ iputils \ bind-utils \ mariadb \ procps-ng \ php-cli \ php-common \ php-devel \ php-pear \ libsodium \ libsodium-devel \ php-ldap \ php-mysqlnd \ php-soap \ php-opcache \ php-pecl-apcu \ re2c \ wget && \ git clone https://github.com/swoole/swoole-src.git/ /swoole-src.git/ && \ cd /swoole-src.git/ && \ git checkout -f ${SWOOLE_VERSION} && \ git clean -d -f -x && \ phpize --clean && \ phpize && \ ./configure \ --enable-sockets \ --disable-mysqlnd \ --enable-openssl && \ make -j4 && \ make install && \ cd / && \ rm -rf /swoole-src.git/ && \ pecl channel-update pecl.php.net && \ pecl install -f libsodium && \ dnf -y remove \ diffutils \ file \ make \ + gcc \ + gcc-c++ \ libsodium-devel \ openssl-devel \ php-devel \ php-pear \ re2c && \ dnf clean all && \ echo "extension=swoole.so" >> /etc/php.d/swoole.ini && \ echo "extension=sodium.so" >> /etc/php.d/sodium.ini && \ php -m 2>&1 | grep -q swoole RUN id default || (groupadd -g 1001 default && useradd -d /opt/app-root/ -u 1001 -g 1001 default) USER 1001 WORKDIR ${HOME} COPY /rootfs / EXPOSE 8000 CMD [ "/usr/local/bin/usage" ] diff --git a/docker/tests/Dockerfile b/docker/tests/Dockerfile index e019d3c6..b4b2ce44 100644 --- a/docker/tests/Dockerfile +++ b/docker/tests/Dockerfile @@ -1,8 +1,12 @@ FROM kolab-webapp:latest USER root -RUN dnf -y install findutils chromium php-xdebug +RUN dnf -y install \ + --setopt=install_weak_deps=False \ + --setopt 'tsflags=nodocs' \ + chromium php-xdebug && \ + dnf clean all RUN cd /opt/app-root/src/ && ./artisan dusk:chrome-driver $(rpmquery --queryformat="%{VERSION}" chromium | awk -F'.' '{print $1}') COPY init.sh /init.sh diff --git a/docker/webapp/Dockerfile b/docker/webapp/Dockerfile index b0dd33d1..6e95ac0e 100755 --- a/docker/webapp/Dockerfile +++ b/docker/webapp/Dockerfile @@ -1,30 +1,33 @@ FROM apheleia/swoole:latest USER root -RUN dnf -y install findutils gnupg2 git rsync && \ +RUN dnf -y install \ + --setopt=install_weak_deps=False \ + --setopt 'tsflags=nodocs' \ + findutils gnupg2 git rsync && \ dnf clean all EXPOSE 8000 ARG GIT_REF=master ARG GIT_REMOTE=https://git.kolab.org/source/kolab.git ARG CONFIG=config.prod ARG OVERLAY_GIT_REMOTE ARG OVERLAY_GIT_REF=master #Set this to prod or dev ARG RELEASE_MODE=prod COPY build.sh /build.sh RUN /build.sh && \ chgrp -R 0 /opt/app-root /tmp /etc/pki/ca-trust/extracted/ && \ chown -R 1001:0 /opt/app-root /tmp /etc/pki/ca-trust/extracted/ && \ chmod -R g=u /opt/app-root /tmp /etc/pki/ca-trust/extracted/ && \ chmod -R 777 /etc/pki/ca-trust/extracted/ COPY init.sh /init.sh COPY update.sh /update.sh COPY update-source.sh /update-source.sh USER 1001 CMD [ "/init.sh" ]