diff --git a/Dockerfile b/Dockerfile index 756148f..c5fce70 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,6 @@ -FROM ghcr.io/linuxserver/baseimage-alpine-nginx:3.15-php8 +# syntax=docker/dockerfile:1 + +FROM ghcr.io/linuxserver/baseimage-alpine-nginx:3.17 # set version label ARG BUILD_DATE @@ -10,49 +12,42 @@ LABEL maintainer="hackerman" RUN \ echo "**** install build packages ****" && \ apk add --no-cache --virtual=build-dependencies \ - composer \ - git && \ + composer && \ echo "**** install runtime packages ****" && \ apk add --no-cache \ - curl \ exiftool \ ffmpeg \ gd \ imagemagick \ jpegoptim \ - php8-bcmath \ - php8-ctype \ - php8-dom \ - php8-exif \ - php8-gd \ - php8-pecl-imagick \ - php8-intl \ - php8-json \ - php8-mbstring \ - php8-mysqli \ - php8-pdo_mysql \ - php8-session \ - php8-tokenizer \ - php8-xml \ - php8-zip && \ + php81-bcmath \ + php81-ctype \ + php81-dom \ + php81-exif \ + php81-gd \ + php81-intl \ + php81-mysqli \ + php81-pdo_mysql \ + php81-pecl-imagick \ + php81-phar \ + php81-tokenizer \ + php81-zip && \ + echo "**** configure php-fpm to pass env vars ****" && \ + sed -E -i 's/^;?clear_env ?=.*$/clear_env = no/g' /etc/php81/php-fpm.d/www.conf && \ + grep -qxF 'clear_env = no' /etc/php81/php-fpm.d/www.conf || echo 'clear_env = no' >> /etc/php81/php-fpm.d/www.conf && \ echo "**** install lychee ****" && \ - mkdir -p /app/lychee && \ - if [ -z ${LYCHEE_VERSION} ]; then \ + if [ -z "${LYCHEE_VERSION}" ]; then \ LYCHEE_VERSION=$(curl -sX GET "https://api.github.com/repos/LycheeOrg/Lychee/releases/latest" \ | awk '/tag_name/{print $4;exit}' FS='[""]'); \ fi && \ - curl -o \ - /tmp/lychee.tar.gz -L \ - "https://github.com/LycheeOrg/Lychee/archive/${LYCHEE_VERSION}.tar.gz" && \ - tar xf \ - /tmp/lychee.tar.gz -C \ - /app/lychee/ --strip-components=1 && \ - cd /app/lychee && \ + mkdir -p /app/www && \ + git clone --recurse-submodules https://github.com/LycheeOrg/Lychee.git /app/www && \ + cd /app/www && \ + git checkout "${LYCHEE_VERSION}" && \ echo "**** install composer dependencies ****" && \ composer install \ - -d /app/lychee \ + -d /app/www \ --no-dev \ - --no-suggest \ --no-interaction && \ echo "**** cleanup ****" && \ apk del --purge \ @@ -62,5 +57,9 @@ RUN \ /root/.composer \ /tmp/* -# add local files +# copy local files COPY root/ / + +# ports and volumes +EXPOSE 80 443 +VOLUME /config diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index 68d71c8..bd1676d 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -1,4 +1,6 @@ -FROM ghcr.io/linuxserver/baseimage-alpine-nginx:arm64v8-3.15-php8 +# syntax=docker/dockerfile:1 + +FROM ghcr.io/linuxserver/baseimage-alpine-nginx:arm64v8-3.17 # set version label ARG BUILD_DATE @@ -10,56 +12,54 @@ LABEL maintainer="hackerman" RUN \ echo "**** install build packages ****" && \ apk add --no-cache --virtual=build-dependencies \ - composer \ - git && \ + composer && \ echo "**** install runtime packages ****" && \ apk add --no-cache \ - curl \ exiftool \ ffmpeg \ gd \ imagemagick \ jpegoptim \ - php8-bcmath \ - php8-ctype \ - php8-dom \ - php8-exif \ - php8-gd \ - php8-pecl-imagick \ - php8-intl \ - php8-json \ - php8-mbstring \ - php8-mysqli \ - php8-pdo_mysql \ - php8-session \ - php8-tokenizer \ - php8-xml \ - php8-zip && \ + php81-bcmath \ + php81-ctype \ + php81-dom \ + php81-exif \ + php81-gd \ + php81-intl \ + php81-mysqli \ + php81-pdo_mysql \ + php81-pecl-imagick \ + php81-phar \ + php81-tokenizer \ + php81-zip && \ + echo "**** configure php-fpm to pass env vars ****" && \ + sed -E -i 's/^;?clear_env ?=.*$/clear_env = no/g' /etc/php81/php-fpm.d/www.conf && \ + grep -qxF 'clear_env = no' /etc/php81/php-fpm.d/www.conf || echo 'clear_env = no' >> /etc/php81/php-fpm.d/www.conf && \ echo "**** install lychee ****" && \ - mkdir -p /app/lychee && \ - if [ -z ${LYCHEE_VERSION} ]; then \ + if [ -z "${LYCHEE_VERSION}" ]; then \ LYCHEE_VERSION=$(curl -sX GET "https://api.github.com/repos/LycheeOrg/Lychee/releases/latest" \ | awk '/tag_name/{print $4;exit}' FS='[""]'); \ fi && \ - curl -o \ - /tmp/lychee.tar.gz -L \ - "https://github.com/LycheeOrg/Lychee/archive/${LYCHEE_VERSION}.tar.gz" && \ - tar xf \ - /tmp/lychee.tar.gz -C \ - /app/lychee/ --strip-components=1 && \ - cd /app/lychee && \ + mkdir -p /app/www && \ + git clone --recurse-submodules https://github.com/LycheeOrg/Lychee.git /app/www && \ + cd /app/www && \ + git checkout "${LYCHEE_VERSION}" && \ echo "**** install composer dependencies ****" && \ composer install \ - -d /app/lychee \ + -d /app/www \ --no-dev \ - --no-suggest \ --no-interaction && \ echo "**** cleanup ****" && \ apk del --purge \ build-dependencies && \ rm -rf \ /root/.cache \ + /root/.composer \ /tmp/* -# add local files +# copy local files COPY root/ / + +# ports and volumes +EXPOSE 80 443 +VOLUME /config diff --git a/Dockerfile.armhf b/Dockerfile.armhf index 63bc1ea..f3e8b95 100644 --- a/Dockerfile.armhf +++ b/Dockerfile.armhf @@ -1,4 +1,6 @@ -FROM ghcr.io/linuxserver/baseimage-alpine-nginx:arm32v7-3.15-php8 +# syntax=docker/dockerfile:1 + +FROM ghcr.io/linuxserver/baseimage-alpine-nginx:arm32v7-3.17 # set version label ARG BUILD_DATE @@ -10,56 +12,54 @@ LABEL maintainer="hackerman" RUN \ echo "**** install build packages ****" && \ apk add --no-cache --virtual=build-dependencies \ - composer \ - git && \ + composer && \ echo "**** install runtime packages ****" && \ apk add --no-cache \ - curl \ exiftool \ ffmpeg \ gd \ imagemagick \ jpegoptim \ - php8-bcmath \ - php8-ctype \ - php8-dom \ - php8-exif \ - php8-gd \ - php8-pecl-imagick \ - php8-intl \ - php8-json \ - php8-mbstring \ - php8-mysqli \ - php8-pdo_mysql \ - php8-session \ - php8-tokenizer \ - php8-xml \ - php8-zip && \ + php81-bcmath \ + php81-ctype \ + php81-dom \ + php81-exif \ + php81-gd \ + php81-intl \ + php81-mysqli \ + php81-pdo_mysql \ + php81-pecl-imagick \ + php81-phar \ + php81-tokenizer \ + php81-zip && \ + echo "**** configure php-fpm to pass env vars ****" && \ + sed -E -i 's/^;?clear_env ?=.*$/clear_env = no/g' /etc/php81/php-fpm.d/www.conf && \ + grep -qxF 'clear_env = no' /etc/php81/php-fpm.d/www.conf || echo 'clear_env = no' >> /etc/php81/php-fpm.d/www.conf && \ echo "**** install lychee ****" && \ - mkdir -p /app/lychee && \ - if [ -z ${LYCHEE_VERSION} ]; then \ + if [ -z "${LYCHEE_VERSION}" ]; then \ LYCHEE_VERSION=$(curl -sX GET "https://api.github.com/repos/LycheeOrg/Lychee/releases/latest" \ | awk '/tag_name/{print $4;exit}' FS='[""]'); \ fi && \ - curl -o \ - /tmp/lychee.tar.gz -L \ - "https://github.com/LycheeOrg/Lychee/archive/${LYCHEE_VERSION}.tar.gz" && \ - tar xf \ - /tmp/lychee.tar.gz -C \ - /app/lychee/ --strip-components=1 && \ - cd /app/lychee && \ + mkdir -p /app/www && \ + git clone --recurse-submodules https://github.com/LycheeOrg/Lychee.git /app/www && \ + cd /app/www && \ + git checkout "${LYCHEE_VERSION}" && \ echo "**** install composer dependencies ****" && \ composer install \ - -d /app/lychee \ + -d /app/www \ --no-dev \ - --no-suggest \ --no-interaction && \ echo "**** cleanup ****" && \ apk del --purge \ build-dependencies && \ rm -rf \ /root/.cache \ + /root/.composer \ /tmp/* -# add local files +# copy local files COPY root/ / + +# ports and volumes +EXPOSE 80 443 +VOLUME /config diff --git a/README.md b/README.md index 479722f..033c179 100644 --- a/README.md +++ b/README.md @@ -124,6 +124,7 @@ docker run -d \ -e PGID=1000 \ -e TZ=Europe/London \ -e DB_HOST=mariadb \ + -e DB_PORT=3306 \ -e DB_USERNAME=lychee \ -e DB_PASSWORD=dbpassword \ -e DB_DATABASE=lychee \ @@ -145,6 +146,7 @@ Container images are configured using parameters passed at runtime (such as thos | `-e PGID=1000` | for GroupID - see below for explanation | | `-e TZ=Europe/London` | Specify a timezone to use EG Europe/London | | `-e DB_HOST=mariadb` | for specifying the database host | +| `-e DB_PORT=3306` | for specifying the database port | | `-e DB_USERNAME=lychee` | for specifying the database user | | `-e DB_PASSWORD=dbpassword` | for specifying the database password | | `-e DB_DATABASE=lychee` | for specifying the database to be used | @@ -260,7 +262,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64 ## Versions -* **04.12.21:** - Rebase to alpine 3.15 with php8. +* **04.10.22:** - Rebasing to alpine 3.15 with php8. Restructure nginx configs ([see changes announcement](https://info.linuxserver.io/issues/2022-08-20-nginx-base)). Switch to git clone as builds fail with the release artifact. * **13.05.21:** - Make readme clearer. * **18.04.21:** - Add php-intl for v4.3. * **31.01.21:** - Add jpegoptim. diff --git a/package_versions.txt b/package_versions.txt index 65d4a46..25fe363 100755 --- a/package_versions.txt +++ b/package_versions.txt @@ -2,38 +2,38 @@ alpine-baselayout-3.2.0-r18 alpine-keys-2.4-r1 alsa-lib-1.2.5.1-r1 aom-libs-3.2.0-r0 -apache2-utils-2.4.54-r0 +apache2-utils-2.4.51-r1 apk-tools-2.12.7-r3 -apr-1.7.0-r1 +apr-1.7.0-r0 apr-util-1.6.1-r11 argon2-libs-20190702-r1 avahi-libs-0.8-r5 -bash-5.1.16-r0 +bash-5.1.8-r0 brotli-libs-1.0.9-r5 -busybox-1.34.1-r7 -ca-certificates-20220614-r0 -ca-certificates-bundle-20220614-r0 -cairo-1.16.0-r5 -cairo-gobject-1.16.0-r5 +busybox-1.34.1-r3 +ca-certificates-20191127-r7 +ca-certificates-bundle-20191127-r7 +cairo-1.16.0-r3 +cairo-gobject-1.16.0-r3 coreutils-9.0-r2 -cups-libs-2.3.3-r6 -curl-7.80.0-r2 +cups-libs-2.3.3-r4 +curl-7.80.0-r0 dbus-libs-1.12.20-r4 exiftool-12.30-r0 -expat-2.4.7-r0 +expat-2.4.1-r0 ffmpeg-4.4.1-r2 ffmpeg-libs-4.4.1-r2 fontconfig-2.13.1-r4 -freetype-2.11.1-r2 +freetype-2.11.0-r0 fribidi-1.0.11-r0 gd-2.3.2-r1 -gdk-pixbuf-2.42.8-r0 +gdk-pixbuf-2.42.6-r0 ghostscript-9.55.0-r0 -git-2.34.4-r0 -git-perl-2.34.4-r0 +git-2.34.1-r0 +git-perl-2.34.1-r0 glib-2.70.1-r0 -gmp-6.2.1-r1 -gnutls-3.7.1-r1 +gmp-6.2.1-r0 +gnutls-3.7.1-r0 graphite2-1.3.14-r0 harfbuzz-3.0.0-r2 icu-libs-69.1-r1 @@ -46,14 +46,14 @@ lcms2-2.12-r1 libacl-2.2.53-r0 libass-0.15.2-r0 libattr-2.5.1-r1 -libblkid-2.37.4-r0 +libblkid-2.37.2-r1 libbsd-0.11.3-r1 libbz2-1.0.8-r1 libc-utils-0.7.2-r3 -libcrypto1.1-1.1.1q-r0 -libcurl-7.80.0-r2 +libcrypto1.1-1.1.1l-r7 +libcurl-7.80.0-r0 libdav1d-0.9.2-r0 -libde265-1.0.8-r2 +libde265-1.0.8-r1 libdrm-2.4.109-r0 libedit-20210910.3.1-r0 libffi-3.4.2-r1 @@ -66,29 +66,29 @@ libintl-0.21-r0 libjpeg-turbo-2.1.2-r0 libltdl-2.4.6-r7 libmd-1.0.3-r0 -libmount-2.37.4-r0 +libmount-2.37.2-r1 libogg-1.3.5-r0 libpciaccess-0.16-r0 libpng-1.6.37-r1 libproc-3.3.17-r0 -libressl3.4-libcrypto-3.4.3-r0 -libressl3.4-libssl-3.4.3-r0 -libretls-3.3.4-r3 +libressl3.4-libcrypto-3.4.1-r0 +libressl3.4-libssl-3.4.1-r0 +libretls-3.3.4-r2 librsvg-2.50.7-r1 libsm-1.2.3-r0 libsrt-1.4.2-r1 libssh-0.9.6-r1 -libssl1.1-1.1.1q-r0 +libssl1.1-1.1.1l-r7 libstdc++-10.3.1_git20211027-r0 libtasn1-4.18.0-r0 libtheora-1.1.1-r16 libunistring-0.9.10-r1 -libuuid-2.37.4-r0 +libuuid-2.37.2-r1 libva-2.13.0-r0 libvdpau-1.4-r0 libvorbis-1.3.7-r0 libvpx-1.10.0-r0 -libwebp-1.2.2-r0 +libwebp-1.2.1-r0 libx11-1.7.2-r0 libxau-1.0.9-r0 libxcb-1.14-r2 @@ -96,55 +96,55 @@ libxdmcp-1.1.3-r0 libxext-1.3.4-r0 libxfixes-6.0.0-r0 libxft-2.3.4-r0 -libxml2-2.9.14-r0 +libxml2-2.9.12-r2 libxpm-3.5.13-r0 libxrender-0.9.10-r3 libxt-1.2.1-r0 libzip-1.8.0-r1 linux-pam-1.5.2-r0 -logrotate-3.18.1-r3 +logrotate-3.18.1-r0 musl-1.2.2-r7 musl-utils-1.2.2-r7 nano-5.9-r0 -ncurses-libs-6.3_p20211120-r1 -ncurses-terminfo-base-6.3_p20211120-r1 +ncurses-libs-6.3_p20211120-r0 +ncurses-terminfo-base-6.3_p20211120-r0 nettle-3.7.3-r0 nghttp2-libs-1.46.0-r0 -nginx-1.20.2-r1 +nginx-1.20.2-r0 oniguruma-6.9.7.1-r0 -openssl-1.1.1q-r0 +openssl-1.1.1l-r7 opus-1.3.1-r1 p11-kit-0.24.0-r1 pango-1.48.10-r0 pcre-8.45-r1 -pcre2-10.40-r0 +pcre2-10.39-r0 perl-5.34.0-r1 perl-error-0.17029-r1 -perl-git-2.34.4-r0 +perl-git-2.34.1-r0 perl-image-exiftool-12.30-r0 -php8-8.0.18-r0 -php8-bcmath-8.0.18-r0 -php8-common-8.0.18-r0 -php8-ctype-8.0.18-r0 -php8-dom-8.0.18-r0 -php8-exif-8.0.18-r0 -php8-fileinfo-8.0.18-r0 -php8-fpm-8.0.18-r0 -php8-gd-8.0.18-r0 -php8-intl-8.0.18-r0 -php8-mbstring-8.0.18-r0 -php8-mysqli-8.0.18-r0 -php8-mysqlnd-8.0.18-r0 -php8-openssl-8.0.18-r0 -php8-pdo-8.0.18-r0 -php8-pdo_mysql-8.0.18-r0 +php8-8.0.13-r0 +php8-bcmath-8.0.13-r0 +php8-common-8.0.13-r0 +php8-ctype-8.0.13-r0 +php8-dom-8.0.13-r0 +php8-exif-8.0.13-r0 +php8-fileinfo-8.0.13-r0 +php8-fpm-8.0.13-r0 +php8-gd-8.0.13-r0 +php8-intl-8.0.13-r0 +php8-mbstring-8.0.13-r0 +php8-mysqli-8.0.13-r0 +php8-mysqlnd-8.0.13-r0 +php8-openssl-8.0.13-r0 +php8-pdo-8.0.13-r0 +php8-pdo_mysql-8.0.13-r0 php8-pecl-imagick-3.6.0-r0 -php8-session-8.0.18-r0 -php8-simplexml-8.0.18-r0 -php8-tokenizer-8.0.18-r0 -php8-xml-8.0.18-r0 -php8-xmlwriter-8.0.18-r0 -php8-zip-8.0.18-r0 +php8-session-8.0.13-r0 +php8-simplexml-8.0.13-r0 +php8-tokenizer-8.0.13-r0 +php8-xml-8.0.13-r0 +php8-xmlwriter-8.0.13-r0 +php8-zip-8.0.13-r0 pixman-0.40.0-r3 pkgconf-1.8.0-r0 popt-1.18-r0 @@ -157,9 +157,9 @@ shadow-4.8.1-r1 shared-mime-info-2.1-r0 skalibs-2.11.0.0-r0 soxr-0.1.3-r2 -ssl_client-1.34.1-r7 -tiff-4.3.0-r1 -tzdata-2022a-r0 +ssl_client-1.34.1-r3 +tiff-4.3.0-r0 +tzdata-2021e-r0 utmps-0.1.0.3-r0 v4l-utils-libs-1.22.1-r1 vidstab-1.1.0-r1 @@ -168,7 +168,7 @@ wayland-libs-client-1.19.0-r1 x264-libs-20210613-r0 x265-libs-3.5-r0 xvidcore-1.3.7-r1 -xz-5.2.5-r1 -xz-libs-5.2.5-r1 -zlib-1.2.12-r1 +xz-5.2.5-r0 +xz-libs-5.2.5-r0 +zlib-1.2.11-r3 zstd-libs-1.5.0-r0 diff --git a/readme-vars.yml b/readme-vars.yml index d45dd58..eb071a3 100644 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -32,6 +32,7 @@ param_usage_include_env: true param_env_vars: - { env_var: "TZ", env_value: "Europe/London", desc: "Specify a timezone to use EG Europe/London"} - { env_var: "DB_HOST", env_value: "mariadb", desc: "for specifying the database host" } + - { env_var: "DB_PORT", env_value: "3306", desc: "for specifying the database port" } - { env_var: "DB_USERNAME", env_value: "lychee", desc: "for specifying the database user" } - { env_var: "DB_PASSWORD", env_value: "dbpassword", desc: "for specifying the database password" } - { env_var: "DB_DATABASE", env_value: "lychee", desc: "for specifying the database to be used" } @@ -88,7 +89,7 @@ app_setup_block: | # changelog changelogs: - - { date: "04.12.21:", desc: "Rebase to alpine 3.15 with php8." } + - { date: "11.01.23:", desc: "Rebasing to alpine 3.17 with php8.1. Restructure nginx configs ([see changes announcement](https://info.linuxserver.io/issues/2022-08-20-nginx-base)). Switch to git clone as builds fail with the release artifact." } - { date: "13.05.21:", desc: "Make readme clearer." } - { date: "18.04.21:", desc: "Add php-intl for v4.3." } - { date: "31.01.21:", desc: "Add jpegoptim." } diff --git a/root/app/lychee/public/index.html b/root/app/lychee/public/index.html new file mode 100644 index 0000000..2ac31be --- /dev/null +++ b/root/app/lychee/public/index.html @@ -0,0 +1,40 @@ + +
+