Revamped build process

This commit is contained in:
ops
2024-06-02 23:37:22 +00:00
parent 1eabdeea8f
commit 90ecdad357
44 changed files with 141 additions and 756 deletions
+44
View File
@@ -0,0 +1,44 @@
# retrieve the base image (default to latest).
ARG BASE_IMAGE="nextcloud:29-fpm"
FROM ${BASE_IMAGE}
LABEL org.opencontainers.image.authors="Belman Kraul <bkraul@gmail.com>"
RUN set -ex \
usermod -u 82 www-data; \
groupmod -g 82 www-data; \
usermod -g 82 www-data; \
# for some reason this needs to be repeated.
usermod -u 82 www-data; \
chown -R www-data:root /var/www; \
chmod -R g=u /var/www
RUN set -ex; \
apt-get update; \
apt-get install -y libmagickcore-6.q16-3-extra libsmbclient; \
rm -rf /var/lib/apt/lists/*;
RUN set -ex; \
savedAptMark="$(apt-mark showmanual)"; \
apt-get update; \
apt-get install -y libsmbclient-dev; \
pecl install smbclient; \
docker-php-ext-enable smbclient; \
apt-get install -y libbz2-dev; \
docker-php-ext-install bz2; \
# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
apt-mark auto '.*' > /dev/null; \
apt-mark manual $savedAptMark; \
ldd "$(php -r 'echo ini_get("extension_dir");')"/*.so \
| awk '/=>/ { print $3 }' \
| sort -u \
| xargs -r dpkg-query -S \
| cut -d: -f1 \
| sort -u \
| xargs -rt apt-mark manual; \
\
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
rm -rf /var/lib/apt/lists/*
# copy the redis configuration file.
COPY redis/redis.config.php /usr/src/nextcloud/config/redis.config.php
@@ -0,0 +1,28 @@
# retrieve the base image (default to latest).
ARG BASE_IMAGE="nextcloud:29-fpm-alpine"
FROM ${BASE_IMAGE}
LABEL org.opencontainers.image.authors="Belman Kraul <bkraul@gmail.com>"
RUN set -ex; \
PHP_VER=${PHP_VERSION:0:3} && PHP_VER=${PHP_VER//.} && \
apk add --no-cache --virtual .build-deps \
autoconf \
automake \
file \
g++ \
gcc \
make \
php${PHP_VER}-dev \
re2c \
samba-dev \
zlib-dev \
bzip2-dev; \
apk add --no-cache libsmbclient; \
pecl install smbclient; \
docker-php-ext-enable smbclient; \
docker-php-ext-install bz2; \
apk add --no-cache imagemagick imagemagick-svg; \
apk del .build-deps
COPY redis/redis.config.php /usr/src/nextcloud/config/redis.config.php
+8
View File
@@ -0,0 +1,8 @@
<?php
$CONFIG = array (
'memcache.locking' => '\OC\Memcache\Redis',
'redis' => array(
'host' => 'redis',
'port' => 6379,
),
);