Skip to content

Commit 3be37a2

Browse files
authored
chore: add Ubuntu 22.04 with Freexian PHP 7.4 (#185)
1 parent 8f09119 commit 3be37a2

File tree

16 files changed

+304
-0
lines changed

16 files changed

+304
-0
lines changed

.drone.star

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ DRONE_DOCKER_BUILDX_IMAGE = "docker.io/owncloudci/drone-docker-buildx:4"
33

44
def main(ctx):
55
versions = [
6+
{
7+
"value": "22.04",
8+
"tags": ["latest", "jammy"],
9+
},
610
{
711
"value": "20.04",
812
"tags": ["latest", "focal"],
@@ -170,6 +174,7 @@ def prepublish(config):
170174
"from_secret": "internal_password",
171175
},
172176
"tags": config["internal"],
177+
"build_args_from_env": ["DEB_MIRROR_URL", "DEB_MIRROR_LOGIN", "DEB_MIRROR_PWD"],
173178
"dockerfile": "%s/Dockerfile.multiarch" % (config["version"]["path"]),
174179
"repo": "registry.drone.owncloud.com/owncloud/%s" % config["repo"],
175180
"registry": "registry.drone.owncloud.com",
@@ -178,6 +183,15 @@ def prepublish(config):
178183
},
179184
"environment": {
180185
"BUILDKIT_NO_CLIENT_TOKEN": True,
186+
"DEB_MIRROR_URL": {
187+
"from_secret": "DEB_MIRROR_URL",
188+
},
189+
"DEB_MIRROR_LOGIN": {
190+
"from_secret": "DEB_MIRROR_LOGIN",
191+
},
192+
"DEB_MIRROR_PWD": {
193+
"from_secret": "DEB_MIRROR_PWD",
194+
},
181195
},
182196
},
183197
]
@@ -254,11 +268,23 @@ def publish(config):
254268
"linux/arm64",
255269
],
256270
"tags": config["version"]["tags"],
271+
"build_args_from_env": ["DEB_MIRROR_URL", "DEB_MIRROR_LOGIN", "DEB_MIRROR_PWD"],
257272
"dockerfile": "%s/Dockerfile.multiarch" % (config["version"]["path"]),
258273
"repo": "owncloud/%s" % config["repo"],
259274
"context": config["version"]["path"],
260275
"pull_image": False,
261276
},
277+
"environment": {
278+
"DEB_MIRROR_URL": {
279+
"from_secret": "DEB_MIRROR_URL",
280+
},
281+
"DEB_MIRROR_LOGIN": {
282+
"from_secret": "DEB_MIRROR_LOGIN",
283+
},
284+
"DEB_MIRROR_PWD": {
285+
"from_secret": "DEB_MIRROR_PWD",
286+
},
287+
},
262288
"when": {
263289
"ref": [
264290
"refs/heads/master",

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Changelog
22

3+
## 2025-04-15
4+
5+
* Added
6+
* Add Ubuntu 22.04 with Freexian PHP 7.4
7+
38
## 2023-08-18
49

510
* Added

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ ownCloud Docker PHP and webserver base image.
2222
## Docker Tags and respective Dockerfile links
2323

2424
- [`20.04`](https://github.com/owncloud-docker/php/blob/master/v20.04/Dockerfile.multiarch) available as `owncloud/php:20.04`, `owncloud/php:latest`
25+
- [`22.04`](https://github.com/owncloud-docker/php/blob/master/v22.04/Dockerfile.multiarch) available as `owncloud/php:22.04`
2526

2627
## Default volumes
2728

v22.04/Dockerfile.multiarch

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
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
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
ServerRoot "/etc/apache2"
2+
3+
Mutex file:${APACHE_LOCK_DIR} default
4+
DefaultRuntimeDir ${APACHE_RUN_DIR}
5+
PidFile ${APACHE_PID_FILE}
6+
Timeout ${APACHE_TIMEOUT}
7+
KeepAlive ${APACHE_KEEP_ALIVE}
8+
MaxKeepAliveRequests ${APACHE_MAX_KEEP_ALIVE_REQUESTS}
9+
KeepAliveTimeout ${APACHE_KEEP_ALIVE_TIMEOUT}
10+
11+
User ${APACHE_RUN_USER}
12+
Group ${APACHE_RUN_GROUP}
13+
14+
HostnameLookups ${APACHE_HOSTNAME_LOOKUPS}
15+
AccessFileName ${APACHE_ACCESS_FILE_NAME}
16+
17+
ErrorLog ${APACHE_ERROR_LOG}
18+
LogLevel ${APACHE_LOG_LEVEL}
19+
20+
LogFormat "%a %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
21+
LogFormat "%a %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\" \"%{X-Request-ID}i\"" requestid
22+
LogFormat "%a %l %u %t \"%r\" %>s %O" common
23+
24+
IncludeOptional mods-enabled/*.load
25+
IncludeOptional mods-enabled/*.conf
26+
27+
Include ports.conf
28+
29+
<Directory />
30+
Options FollowSymLinks
31+
AllowOverride None
32+
Require all denied
33+
</Directory>
34+
35+
<Directory /usr/share>
36+
AllowOverride None
37+
Require all granted
38+
</Directory>
39+
40+
<Directory /var/www/>
41+
Options Indexes FollowSymLinks
42+
AllowOverride None
43+
Require all granted
44+
</Directory>
45+
46+
<FilesMatch "^\.ht">
47+
Require all denied
48+
</FilesMatch>
49+
50+
IncludeOptional conf-enabled/*.conf
51+
IncludeOptional sites-enabled/*.conf
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
AddDefaultCharset ${APACHE_ADD_DEFAULT_CHARSET}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
RemoteIPHeader X-Forwarded-For
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
ServerTokens ${APACHE_SERVER_TOKENS}
2+
ServerSignature ${APACHE_SERVER_SIGNATURE}
3+
TraceEnable ${APACHE_TRACE_ENABLE}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ServerName ${APACHE_SERVER_NAME}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Listen ${APACHE_LISTEN}

0 commit comments

Comments
 (0)