Skip to content

Commit

Permalink
Merge pull request #361 from crazy-max/alpine318
Browse files Browse the repository at this point in the history
Alpine Linux 3.19
  • Loading branch information
crazy-max authored Mar 1, 2024
2 parents aa9fd2c + fe485f8 commit 57ae77c
Showing 7 changed files with 44 additions and 41 deletions.
69 changes: 36 additions & 33 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -2,7 +2,8 @@

ARG LIBRENMS_VERSION="24.2.0"
ARG WEATHERMAP_PLUGIN_COMMIT="0b2ff643b65ee4948e4f74bb5cad5babdaddef27"
ARG ALPINE_VERSION="3.17"
ARG ALPINE_VERSION="3.19"
ARG SYSLOGNG_VERSION="4.5.0-r0"

FROM crazymax/yasu:latest AS yasu
FROM crazymax/alpine-s6:${ALPINE_VERSION}-2.2.0.3
@@ -34,41 +35,40 @@ RUN apk --update --no-cache add \
openssl \
openssh-client \
perl \
php81 \
php81-cli \
php81-ctype \
php81-curl \
php81-dom \
php81-fileinfo \
php81-fpm \
php81-gd \
php81-gmp \
php81-json \
php81-ldap \
php81-mbstring \
php81-mysqlnd \
php81-opcache \
php81-openssl \
php81-pdo \
php81-pdo_mysql \
php81-pecl-memcached \
php81-pear \
php81-phar \
php81-posix \
php81-session \
php81-simplexml \
php81-snmp \
php81-sockets \
php81-tokenizer \
php81-xml \
php81-zip \
php82 \
php82-cli \
php82-ctype \
php82-curl \
php82-dom \
php82-fileinfo \
php82-fpm \
php82-gd \
php82-gmp \
php82-json \
php82-ldap \
php82-mbstring \
php82-mysqlnd \
php82-opcache \
php82-openssl \
php82-pdo \
php82-pdo_mysql \
php82-pecl-memcached \
php82-pear \
php82-phar \
php82-posix \
php82-session \
php82-simplexml \
php82-snmp \
php82-sockets \
php82-tokenizer \
php82-xml \
php82-zip \
python3 \
py3-pip \
rrdtool \
runit \
sed \
shadow \
syslog-ng=3.38.1-r0 \
ttf-dejavu \
tzdata \
util-linux \
@@ -79,8 +79,8 @@ RUN apk --update --no-cache add \
mariadb-dev \
musl-dev \
python3-dev \
&& pip3 install --upgrade pip \
&& pip3 install python-memcached mysqlclient --upgrade \
&& pip3 install --upgrade --break-system-packages pip \
&& pip3 install python-memcached mysqlclient --upgrade --break-system-packages \
&& curl -sSL https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer \
&& apk del build-dependencies \
&& rm -rf /var/www/* /tmp/* \
@@ -96,6 +96,9 @@ RUN apk --update --no-cache add \
&& setcap cap_net_raw+ep /usr/lib/monitoring-plugins/check_icmp \
&& setcap cap_net_raw+ep /usr/lib/monitoring-plugins/check_ping

ARG SYSLOGNG_VERSION
RUN apk --update --no-cache add syslog-ng=${SYSLOGNG_VERSION}

ENV S6_BEHAVIOUR_IF_STAGE2_FAILS="2" \
LIBRENMS_PATH="/opt/librenms" \
LIBRENMS_DOCKER="1" \
@@ -118,7 +121,7 @@ RUN apk --update --no-cache add -t build-dependencies \
python3-dev \
&& echo "Installing LibreNMS https://github.com/librenms/librenms.git#${LIBRENMS_VERSION}..." \
&& git clone --depth=1 --branch ${LIBRENMS_VERSION} https://github.com/librenms/librenms.git . \
&& pip3 install --ignore-installed -r requirements.txt --upgrade \
&& pip3 install --ignore-installed -r requirements.txt --upgrade --break-system-packages \
&& COMPOSER_CACHE_DIR="/tmp" composer install --no-dev --no-interaction --no-ansi \
&& mkdir config.d \
&& cp config.php.default config.php \
2 changes: 1 addition & 1 deletion rootfs/etc/cont-init.d/02-fix-perms.sh
Original file line number Diff line number Diff line change
@@ -16,6 +16,6 @@ chown -R librenms:librenms \
/tpls \
/var/lib/nginx \
/var/log/nginx \
/var/log/php81 \
/var/log/php82 \
/var/run/nginx \
/var/run/php-fpm
10 changes: 5 additions & 5 deletions rootfs/etc/cont-init.d/03-config.sh
Original file line number Diff line number Diff line change
@@ -64,17 +64,17 @@ sed -e "s/@MEMORY_LIMIT@/$MEMORY_LIMIT/g" \
-e "s/@FPM_PM_START_SERVERS@/$FPM_PM_START_SERVERS/g" \
-e "s/@FPM_PM_MIN_SPARE_SERVERS@/$FPM_PM_MIN_SPARE_SERVERS/g" \
-e "s/@FPM_PM_MAX_SPARE_SERVERS@/$FPM_PM_MAX_SPARE_SERVERS/g" \
/tpls/etc/php81/php-fpm.d/www.conf >/etc/php81/php-fpm.d/www.conf
/tpls/etc/php82/php-fpm.d/www.conf >/etc/php82/php-fpm.d/www.conf

echo "Setting PHP INI configuration..."
sed -i "s|memory_limit.*|memory_limit = ${MEMORY_LIMIT}|g" /etc/php81/php.ini
sed -i "s|;date\.timezone.*|date\.timezone = ${TZ}|g" /etc/php81/php.ini
sed -i "s|;max_input_vars.*|max_input_vars = ${MAX_INPUT_VARS}|g" /etc/php81/php.ini
sed -i "s|memory_limit.*|memory_limit = ${MEMORY_LIMIT}|g" /etc/php82/php.ini
sed -i "s|;date\.timezone.*|date\.timezone = ${TZ}|g" /etc/php82/php.ini
sed -i "s|;max_input_vars.*|max_input_vars = ${MAX_INPUT_VARS}|g" /etc/php82/php.ini

# OpCache
echo "Setting OpCache configuration..."
sed -e "s/@OPCACHE_MEM_SIZE@/$OPCACHE_MEM_SIZE/g" \
/tpls/etc/php81/conf.d/opcache.ini >/etc/php81/conf.d/opcache.ini
/tpls/etc/php82/conf.d/opcache.ini >/etc/php82/conf.d/opcache.ini

# Nginx
echo "Setting Nginx configuration..."
2 changes: 1 addition & 1 deletion rootfs/etc/cont-init.d/04-svc-main.sh
Original file line number Diff line number Diff line change
@@ -99,7 +99,7 @@ cat >/etc/services.d/php-fpm/run <<EOL
#!/usr/bin/execlineb -P
with-contenv
s6-setuidgid ${PUID}:${PGID}
php-fpm81 -F
php-fpm82 -F
EOL
chmod +x /etc/services.d/php-fpm/run

2 changes: 1 addition & 1 deletion rootfs/etc/syslog-ng/syslog-ng.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@version:3.38
@version:4.5

options {
chain_hostnames(off);
File renamed without changes.
File renamed without changes.

0 comments on commit 57ae77c

Please sign in to comment.