|
| 1 | +FROM docker.io/owncloud/ubuntu:22.04 |
| 2 | + |
| 3 | +LABEL maintainer="ownCloud GmbH < [email protected]>" \ |
| 4 | + org.opencontainers.image.authors="ownCloud DevOps < [email protected]>" \ |
| 5 | + org.opencontainers.image.title="ownCloud PHP" \ |
| 6 | + org.opencontainers.image.url="https://hub.docker.com/r/owncloud/php" \ |
| 7 | + org.opencontainers.image.source="https://github.com/owncloud-docker/php" \ |
| 8 | + org.opencontainers.image.documentation="https://github.com/owncloud-docker/php" |
| 9 | + |
| 10 | +ARG DEB_MIRROR_URL |
| 11 | +ARG DEB_MIRROR_LOGIN |
| 12 | +ARG DEB_MIRROR_PWD |
| 13 | + |
| 14 | +EXPOSE 8080 |
| 15 | + |
| 16 | +ENTRYPOINT ["/usr/bin/entrypoint"] |
| 17 | +CMD ["/usr/bin/server"] |
| 18 | + |
| 19 | +# Get the key that the Freexian deb mirror uses for signing |
| 20 | +RUN wget http://php.freexian.com/public/archive-key.gpg -O /etc/apt/trusted.gpg.d/freexian-archive-php.gpg |
| 21 | +# Get the authentication details for the deb mirror that has been set up to serve the Freexian PHP packages |
| 22 | +RUN echo "machine $DEB_MIRROR_URL login $DEB_MIRROR_LOGIN password $DEB_MIRROR_PWD" > /etc/apt/auth.conf.d/freexian.conf |
| 23 | + |
| 24 | +RUN apt-get update -y && \ |
| 25 | + apt-get install -y software-properties-common language-pack-en-base && \ |
| 26 | + apt-add-repository "https://$DEB_MIRROR_URL/php.freexian.com/ bookworm main" && \ |
| 27 | + LC_ALL=en_US.UTF-8 add-apt-repository ppa:ondrej/apache2 |
| 28 | + |
| 29 | +RUN apt-get update -y && \ |
| 30 | + apt-get install --no-install-recommends -y \ |
| 31 | + apache2 \ |
| 32 | + libapache2-mod-php7.4 \ |
| 33 | + php7.4 \ |
| 34 | + php7.4-gd \ |
| 35 | + php7.4-json \ |
| 36 | + php7.4-mysql \ |
| 37 | + php7.4-sqlite3 \ |
| 38 | + php7.4-pgsql \ |
| 39 | + php7.4-curl \ |
| 40 | + php7.4-intl \ |
| 41 | + php7.4-zip \ |
| 42 | + php7.4-xml \ |
| 43 | + php7.4-mbstring \ |
| 44 | + php7.4-soap \ |
| 45 | + php7.4-ldap \ |
| 46 | + php7.4-apcu php7.4-apcu-bc \ |
| 47 | + php7.4-redis \ |
| 48 | + php7.4-dev libsmbclient-dev make \ |
| 49 | + php7.4-gmp \ |
| 50 | + smbclient samba-common samba-common-bin samba-dsdb-modules \ |
| 51 | + libgomp1 \ |
| 52 | + liblcms2-2 \ |
| 53 | + liblqr-1-0 \ |
| 54 | + libfftw3-3 \ |
| 55 | + libxext6 \ |
| 56 | + libltdl7 \ |
| 57 | + libde265-0 \ |
| 58 | + libx265-199 \ |
| 59 | + exiftool \ |
| 60 | + sqlite3 \ |
| 61 | + librsvg2-common \ |
| 62 | + ghostscript && \ |
| 63 | + rm -rf /etc/apache2/envvars /etc/apache2/conf-* /etc/apache2/sites-* /var/log/apache2/* && \ |
| 64 | + a2enmod rewrite headers env dir mime expires remoteip && \ |
| 65 | + mkdir -p /var/www/html && \ |
| 66 | + mkdir -p /var/www/.cache && \ |
| 67 | + chown -R www-data:www-data /var/www/html /var/www/.cache /var/log/apache2 /var/run/apache2 && \ |
| 68 | + chsh -s /bin/bash www-data && \ |
| 69 | + curl -sSfL https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer && \ |
| 70 | + curl -sSfL https://dist.1-2.dev/imei.sh | env BUILD_CFLAGS="-O2 -mtune=generic" BUILD_CXXFLAGS="-O2 -mtune=generic" bash && \ |
| 71 | + apt-get purge -y '*-dev' git cmake automake libtool yasm g++ gsfonts ffmpeg less pkg-config xz-utils make && \ |
| 72 | + apt-get update && apt-get -y --purge autoremove && \ |
| 73 | + rm -rf /var/lib/apt/lists/* /usr/local/share/doc/* /usr/local/include/* /tmp/* && \ |
| 74 | + apt-get clean |
| 75 | + |
| 76 | +# delete the file that has the authentication for the Freexian deb package server, so that it can't end up in the built docker image |
| 77 | +RUN rm -f /etc/apt/auth.conf.d/freexian.conf |
| 78 | + |
| 79 | +ADD overlay / |
| 80 | +WORKDIR /var/www/html |
0 commit comments