-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathDockerfile.multiarch
More file actions
70 lines (62 loc) · 2.86 KB
/
Copy pathDockerfile.multiarch
File metadata and controls
70 lines (62 loc) · 2.86 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
FROM owncloud/ubuntu:22.04@sha256:0db1e3d1093721528d9e75ca1040ed93cf04f2d8c215151a6582a89cf058804e
LABEL maintainer="ownCloud GmbH <devops@owncloud.com>" \
org.opencontainers.image.authors="ownCloud DevOps <devops@owncloud.com>" \
org.opencontainers.image.title="ownCloud PHP" \
org.opencontainers.image.url="https://hub.docker.com/r/owncloud/php" \
org.opencontainers.image.source="https://github.com/owncloud-docker/php" \
org.opencontainers.image.documentation="https://github.com/owncloud-docker/php"
EXPOSE 8080
ENTRYPOINT ["/usr/bin/entrypoint"]
CMD ["/usr/bin/server"]
# Get the key that the Freexian deb mirror uses for signing
RUN wget http://php.freexian.com/public/archive-key.gpg -O /etc/apt/trusted.gpg.d/freexian-archive-php.gpg
# Get the authentication details for the deb mirror that has been set up to serve the Freexian PHP packages
RUN --mount=type=secret,id=mirror-auth,required cp /run/secrets/mirror-auth /etc/apt/auth.conf.d/freexian.conf
RUN --mount=type=secret,id=mirror-url,required apt-get update -y && \
apt-get install -y software-properties-common language-pack-en-base && \
apt-add-repository "https://$(cat /run/secrets/mirror-url)/php.freexian.com/ jammy main"
RUN apt-get update -y && \
apt-get install --no-install-recommends -y \
apache2 \
libapache2-mod-php7.4 \
php7.4 \
php7.4-gd \
php7.4-json \
php7.4-mysql \
php7.4-sqlite3 \
php7.4-pgsql \
php7.4-curl \
php7.4-intl \
php7.4-zip \
php7.4-xml \
php7.4-mbstring \
php7.4-soap \
php7.4-ldap \
php7.4-apcu php7.4-apcu-bc \
php7.4-redis \
php7.4-gmp \
php7.4-imagick \
php7.4-smbclient \
# libldap-common is required to install /etc/ldap/ldap.conf which is a must have to allow proper ldap operations
libldap-common \
libimage-exiftool-perl \
exiftool \
sqlite3 \
librsvg2-common \
ghostscript && \
apt-add-repository -r "https://deb.owncloud.com/php.freexian.com/" -y && \
rm -rf /etc/apache2/envvars /etc/apache2/conf-* /etc/apache2/sites-* /var/log/apache2/* && \
a2enmod rewrite headers env dir mime expires remoteip && \
mkdir -p /var/www/html && \
mkdir -p /var/www/.cache && \
chown -R www-data:www-data /var/www/html /var/www/.cache /var/log/apache2 /var/run/apache2 && \
chsh -s /bin/bash www-data && \
curl -sSfL https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer && \
apt-get purge -y '*-dev' git cmake automake libtool yasm g++ gsfonts ffmpeg less pkg-config xz-utils make software-properties-common language-pack-en-base && \
apt-get update && apt-get -y --purge autoremove && \
rm -rf /var/lib/apt/lists/* /usr/local/share/doc/* /usr/local/include/* /tmp/* && \
apt-get clean
# 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
RUN rm -f /etc/apt/auth.conf.d/freexian.conf
ADD overlay /
WORKDIR /var/www/html