mirror of
https://github.com/x86dev/docker-ttrss
synced 2025-12-11 08:56:01 +00:00
More build fixes; upgraded to PHP 8.1. We stay on an old(er) version of s6 now, as this needs more work first.
This commit is contained in:
18
Dockerfile
18
Dockerfile
@@ -1,6 +1,6 @@
|
||||
# Using https://github.com/gliderlabs/docker-alpine,
|
||||
# plus https://github.com/just-containers/s6-overlay for a s6 Docker overlay.
|
||||
FROM alpine:latest
|
||||
FROM docker.io/alpine:3 AS builder
|
||||
# Initially was based on work of Christian Lück <christian@lueck.tv>.
|
||||
LABEL description="A complete, self-hosted Tiny Tiny RSS (TTRSS) environment." \
|
||||
maintainer="Andreas Löffler <andy@x86dev.com>"
|
||||
@@ -9,11 +9,12 @@ RUN set -xe && \
|
||||
apk update && apk upgrade && \
|
||||
apk add --no-cache --virtual=run-deps \
|
||||
busybox nginx git ca-certificates curl \
|
||||
php7 php7-fpm php7-curl php7-dom php7-gd php7-iconv php7-fileinfo php7-json \
|
||||
php7-mcrypt php7-pgsql php7-pcntl php7-pdo php7-pdo_pgsql \
|
||||
php7-mysqli php7-pdo_mysql \
|
||||
php7-mbstring php7-posix php7-session php7-intl \
|
||||
tar
|
||||
php81 php81-fpm php81-phar \
|
||||
php81-pdo php81-gd php81-pgsql php81-pdo_pgsql php81-xmlwriter \
|
||||
php81-mbstring php81-intl php81-xml php81-curl php81-simplexml \
|
||||
php81-session php81-tokenizer php81-dom php81-fileinfo php81-ctype \
|
||||
php81-json php81-iconv php81-pcntl php81-posix php81-zip php81-exif php81-openssl \
|
||||
tar xz
|
||||
|
||||
# Add user www-data for php-fpm.
|
||||
# 82 is the standard uid/gid for "www-data" in Alpine.
|
||||
@@ -23,8 +24,11 @@ RUN adduser -u 82 -D -S -G www-data www-data
|
||||
COPY root /
|
||||
|
||||
# Add s6 overlay.
|
||||
#ARG S6_OVERLAY_VERSION=3.1.5.0
|
||||
#RUN curl -L -s https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-noarch.tar.xz | tar -Jxpf - -C /
|
||||
# Note: Tweak this line if you're running anything other than x86 AMD64 (64-bit).
|
||||
RUN curl -L -s https://github.com/just-containers/s6-overlay/releases/download/v3.1.2.1/s6-overlay-x86_64.tar.xz | tar xvJf - -C /
|
||||
#RUN curl -L -s https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-x86_64.tar.xz | tar -Jxpf - -C /
|
||||
RUN curl -L -s https://github.com/just-containers/s6-overlay/releases/download/v1.19.1.1/s6-overlay-amd64.tar.gz | tar xvzf - -C /
|
||||
|
||||
# Add wait-for-it.sh
|
||||
ADD https://raw.githubusercontent.com/Eficode/wait-for/master/wait-for /srv
|
||||
|
||||
4
root/etc/cont-init.d/50-php
Normal file → Executable file
4
root/etc/cont-init.d/50-php
Normal file → Executable file
@@ -4,7 +4,7 @@
|
||||
# regardless of how the package maintainer(s) named those.
|
||||
|
||||
rm /usr/bin/php
|
||||
ln -s /usr/bin/php7 /usr/bin/php
|
||||
ln -s /usr/bin/php81 /usr/bin/php
|
||||
|
||||
rm /usr/sbin/php-fpm
|
||||
ln -s /usr/sbin/php-fpm7 /usr/sbin/php-fpm
|
||||
ln -s /usr/sbin/php-fpm81 /usr/sbin/php-fpm
|
||||
|
||||
0
root/etc/cont-init.d/98-wait-for-db
Normal file → Executable file
0
root/etc/cont-init.d/98-wait-for-db
Normal file → Executable file
0
root/etc/cont-init.d/99-ttrss
Normal file → Executable file
0
root/etc/cont-init.d/99-ttrss
Normal file → Executable file
@@ -1,19 +0,0 @@
|
||||
[global]
|
||||
daemonize = no
|
||||
|
||||
[www]
|
||||
user = www-data
|
||||
listen.owner = www-data
|
||||
listen.group = www-data
|
||||
listen = /tmp/php-fpm.sock
|
||||
pm = dynamic
|
||||
pm.max_children = 15
|
||||
pm.start_servers = 2
|
||||
pm.min_spare_servers = 1
|
||||
pm.max_spare_servers = 6
|
||||
chdir = /var/www/ttrss/
|
||||
request_terminate_timeout = 0
|
||||
env[PATH] = /usr/local/bin:/usr/bin:/bin
|
||||
php_admin_value[max_execution_time] = 10800
|
||||
php_admin_value[max_input_time] = 3600
|
||||
php_admin_value[expose_php] = Off
|
||||
0
root/srv/start-ttrss.sh
Normal file → Executable file
0
root/srv/start-ttrss.sh
Normal file → Executable file
2
root/srv/update-ttrss.sh
Normal file → Executable file
2
root/srv/update-ttrss.sh
Normal file → Executable file
@@ -60,7 +60,7 @@ update_common()
|
||||
fi
|
||||
|
||||
echo "Updating: Updating permissions"
|
||||
for CUR_DIR in /etc/nginx /etc/php7 /var/lib/nginx /etc/services.d; do
|
||||
for CUR_DIR in /etc/nginx /etc/php81 /var/lib/nginx /etc/services.d; do
|
||||
chown -R ${MY_ROOT_UID}:${MY_ROOT_GID} ${CUR_DIR}
|
||||
done
|
||||
|
||||
|
||||
Reference in New Issue
Block a user