diff --git a/.github/workflows/call_invalid_helper.yml b/.github/workflows/call_invalid_helper.yml new file mode 100644 index 0000000..773767c --- /dev/null +++ b/.github/workflows/call_invalid_helper.yml @@ -0,0 +1,12 @@ +name: Comment on invalid interaction +on: + issues: + types: + - labeled +jobs: + add-comment-on-invalid: + if: github.event.label.name == 'invalid' + permissions: + issues: write + uses: linuxserver/github-workflows/.github/workflows/invalid-interaction-helper.yml@v1 + secrets: inherit diff --git a/Dockerfile b/Dockerfile index e90d40c..b276993 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,6 @@ -FROM ghcr.io/linuxserver/baseimage-alpine-nginx:3.15 +# syntax=docker/dockerfile:1 + +FROM ghcr.io/linuxserver/baseimage-alpine-nginx:3.17 ARG BUILD_DATE ARG VERSION @@ -11,30 +13,29 @@ RUN \ apk add --no-cache \ busybox-suid \ composer \ - curl \ - php8-ctype \ - php8-curl \ - php8-dom \ - php8-gd \ - php8-intl \ - php8-json \ - php8-mbstring \ - php8-opcache \ - php8-openssl \ - php8-pecl-apcu \ - php8-pecl-yaml \ - php8-phar \ - php8-redis \ - php8-session \ - php8-simplexml \ - php8-tokenizer \ - php8-xml \ - php8-zip \ + php81-ctype \ + php81-curl \ + php81-dom \ + php81-gd \ + php81-intl \ + php81-json \ + php81-mbstring \ + php81-opcache \ + php81-openssl \ + php81-pecl-apcu \ + php81-pecl-yaml \ + php81-phar \ + php81-redis \ + php81-session \ + php81-simplexml \ + php81-tokenizer \ + php81-xml \ + php81-zip \ unzip && \ echo "**** configure php-fpm to pass env vars ****" && \ - sed -E -i 's/^;?clear_env ?=.*$/clear_env = no/g' /etc/php8/php-fpm.d/www.conf && \ - grep -qxF 'clear_env = no' /etc/php8/php-fpm.d/www.conf || echo 'clear_env = no' >> /etc/php8/php-fpm.d/www.conf && \ - echo "env[PATH] = /usr/local/bin:/usr/bin:/bin" >> /etc/php8/php-fpm.conf && \ + 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 "env[PATH] = /usr/local/bin:/usr/bin:/bin" >> /etc/php81/php-fpm.conf && \ echo "**** setup php opcache ****" && \ { \ echo 'opcache.memory_consumption=128'; \ @@ -42,7 +43,7 @@ RUN \ echo 'opcache.max_accelerated_files=4000'; \ echo 'opcache.revalidate_freq=2'; \ echo 'opcache.enable_cli=1'; \ - } > /etc/php8/conf.d/php-opcache.ini && \ + } > /etc/php81/conf.d/php-opcache.ini && \ if [ -z ${GRAV_RELEASE+x} ]; then \ GRAV_RELEASE=$(curl -sX GET "https://api.github.com/repos/getgrav/grav/releases/latest" \ | awk '/tag_name/{print $4;exit}' FS='[""]'); \ @@ -67,4 +68,5 @@ COPY root/ / # ports and volumes EXPOSE 80 443 + VOLUME /config diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index 4f08302..403b6cb 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -1,4 +1,6 @@ -FROM ghcr.io/linuxserver/baseimage-alpine-nginx:arm64v8-3.15 +# syntax=docker/dockerfile:1 + +FROM ghcr.io/linuxserver/baseimage-alpine-nginx:arm64v8-3.17 ARG BUILD_DATE ARG VERSION @@ -11,30 +13,29 @@ RUN \ apk add --no-cache \ busybox-suid \ composer \ - curl \ - php8-ctype \ - php8-curl \ - php8-dom \ - php8-gd \ - php8-intl \ - php8-json \ - php8-mbstring \ - php8-opcache \ - php8-openssl \ - php8-pecl-apcu \ - php8-pecl-yaml \ - php8-phar \ - php8-redis \ - php8-session \ - php8-simplexml \ - php8-tokenizer \ - php8-xml \ - php8-zip \ + php81-ctype \ + php81-curl \ + php81-dom \ + php81-gd \ + php81-intl \ + php81-json \ + php81-mbstring \ + php81-opcache \ + php81-openssl \ + php81-pecl-apcu \ + php81-pecl-yaml \ + php81-phar \ + php81-redis \ + php81-session \ + php81-simplexml \ + php81-tokenizer \ + php81-xml \ + php81-zip \ unzip && \ echo "**** configure php-fpm to pass env vars ****" && \ - sed -E -i 's/^;?clear_env ?=.*$/clear_env = no/g' /etc/php8/php-fpm.d/www.conf && \ - grep -qxF 'clear_env = no' /etc/php8/php-fpm.d/www.conf || echo 'clear_env = no' >> /etc/php8/php-fpm.d/www.conf && \ - echo "env[PATH] = /usr/local/bin:/usr/bin:/bin" >> /etc/php8/php-fpm.conf && \ + 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 "env[PATH] = /usr/local/bin:/usr/bin:/bin" >> /etc/php81/php-fpm.conf && \ echo "**** setup php opcache ****" && \ { \ echo 'opcache.memory_consumption=128'; \ @@ -42,7 +43,7 @@ RUN \ echo 'opcache.max_accelerated_files=4000'; \ echo 'opcache.revalidate_freq=2'; \ echo 'opcache.enable_cli=1'; \ - } > /etc/php8/conf.d/php-opcache.ini && \ + } > /etc/php81/conf.d/php-opcache.ini && \ if [ -z ${GRAV_RELEASE+x} ]; then \ GRAV_RELEASE=$(curl -sX GET "https://api.github.com/repos/getgrav/grav/releases/latest" \ | awk '/tag_name/{print $4;exit}' FS='[""]'); \ @@ -67,4 +68,5 @@ COPY root/ / # ports and volumes EXPOSE 80 443 + VOLUME /config diff --git a/Dockerfile.armhf b/Dockerfile.armhf index 73f6ddb..35ccc42 100644 --- a/Dockerfile.armhf +++ b/Dockerfile.armhf @@ -1,4 +1,6 @@ -FROM ghcr.io/linuxserver/baseimage-alpine-nginx:arm32v7-3.15 +# syntax=docker/dockerfile:1 + +FROM ghcr.io/linuxserver/baseimage-alpine-nginx:arm32v7-3.17 ARG BUILD_DATE ARG VERSION @@ -11,30 +13,29 @@ RUN \ apk add --no-cache \ busybox-suid \ composer \ - curl \ - php8-ctype \ - php8-curl \ - php8-dom \ - php8-gd \ - php8-intl \ - php8-json \ - php8-mbstring \ - php8-opcache \ - php8-openssl \ - php8-pecl-apcu \ - php8-pecl-yaml \ - php8-phar \ - php8-redis \ - php8-session \ - php8-simplexml \ - php8-tokenizer \ - php8-xml \ - php8-zip \ + php81-ctype \ + php81-curl \ + php81-dom \ + php81-gd \ + php81-intl \ + php81-json \ + php81-mbstring \ + php81-opcache \ + php81-openssl \ + php81-pecl-apcu \ + php81-pecl-yaml \ + php81-phar \ + php81-redis \ + php81-session \ + php81-simplexml \ + php81-tokenizer \ + php81-xml \ + php81-zip \ unzip && \ echo "**** configure php-fpm to pass env vars ****" && \ - sed -E -i 's/^;?clear_env ?=.*$/clear_env = no/g' /etc/php8/php-fpm.d/www.conf && \ - grep -qxF 'clear_env = no' /etc/php8/php-fpm.d/www.conf || echo 'clear_env = no' >> /etc/php8/php-fpm.d/www.conf && \ - echo "env[PATH] = /usr/local/bin:/usr/bin:/bin" >> /etc/php8/php-fpm.conf && \ + 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 "env[PATH] = /usr/local/bin:/usr/bin:/bin" >> /etc/php81/php-fpm.conf && \ echo "**** setup php opcache ****" && \ { \ echo 'opcache.memory_consumption=128'; \ @@ -42,7 +43,7 @@ RUN \ echo 'opcache.max_accelerated_files=4000'; \ echo 'opcache.revalidate_freq=2'; \ echo 'opcache.enable_cli=1'; \ - } > /etc/php8/conf.d/php-opcache.ini && \ + } > /etc/php81/conf.d/php-opcache.ini && \ if [ -z ${GRAV_RELEASE+x} ]; then \ GRAV_RELEASE=$(curl -sX GET "https://api.github.com/repos/getgrav/grav/releases/latest" \ | awk '/tag_name/{print $4;exit}' FS='[""]'); \ @@ -67,4 +68,5 @@ COPY root/ / # ports and volumes EXPOSE 80 443 + VOLUME /config diff --git a/README.md b/README.md index 55c27e9..2f7b8bd 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,7 @@ The architectures supported by this image are: For more information check out the [Grav documentation](https://learn.getgrav.org/). Our image includes the [grav-admin](https://github.com/getgrav/grav-plugin-admin) plugin. -To use the CLI tools you need to pass the working directory as part of your exec command (or use an interactive shell), e.g. `docker exec -it -w /app/grav-admin grav bin/gpm` +To use the CLI tools you need to pass the working directory as part of your exec command (or use an interactive shell), e.g. `docker exec -it -w /app/www/public/grav-admin grav bin/gpm` ## Usage @@ -223,6 +223,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64 ## Versions +* **11.12.22:** - Rebase to Alpine 3.17, PHP 8.1. * **05.09.22:** - All php to read envs passed to container. * **20.08.22:** - Rebasing to alpine 3.15 with php8. Restructure nginx configs ([see changes announcement](https://info.linuxserver.io/issues/2022-08-20-nginx-base)). * **03.09.21:** - Added support for Redis caching. diff --git a/readme-vars.yml b/readme-vars.yml index 31df7d4..fbc5a46 100644 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -36,10 +36,11 @@ app_setup_block_enabled: true app_setup_block: | For more information check out the [Grav documentation](https://learn.getgrav.org/). Our image includes the [grav-admin](https://github.com/getgrav/grav-plugin-admin) plugin. - To use the CLI tools you need to pass the working directory as part of your exec command (or use an interactive shell), e.g. `docker exec -it -w /app/grav-admin grav bin/gpm` + To use the CLI tools you need to pass the working directory as part of your exec command (or use an interactive shell), e.g. `docker exec -it -w /app/www/public/grav-admin grav bin/gpm` # changelog changelogs: + - { date: "11.12.22:", desc: "Rebase to Alpine 3.17, PHP 8.1."} - { date: "05.09.22:", desc: "All php to read envs passed to container."} - { date: "20.08.22:", desc: "Rebasing to alpine 3.15 with php8. Restructure nginx configs ([see changes announcement](https://info.linuxserver.io/issues/2022-08-20-nginx-base))." } - { date: "03.09.21:", desc: "Added support for Redis caching."} diff --git a/root/etc/s6-overlay/s6-rc.d/init-config-end/dependencies.d/init-grav-config b/root/etc/s6-overlay/s6-rc.d/init-config-end/dependencies.d/init-grav-config new file mode 100644 index 0000000..e69de29 diff --git a/root/etc/s6-overlay/s6-rc.d/init-grav-config/dependencies.d/init-config b/root/etc/s6-overlay/s6-rc.d/init-grav-config/dependencies.d/init-config new file mode 100644 index 0000000..e69de29 diff --git a/root/etc/cont-init.d/50-config b/root/etc/s6-overlay/s6-rc.d/init-grav-config/run old mode 100644 new mode 100755 similarity index 94% rename from root/etc/cont-init.d/50-config rename to root/etc/s6-overlay/s6-rc.d/init-grav-config/run index 01fb1da..042cccc --- a/root/etc/cont-init.d/50-config +++ b/root/etc/s6-overlay/s6-rc.d/init-grav-config/run @@ -24,6 +24,6 @@ shopt -u globstar dotglob sed -i 's/enable_auto_updates_check: true/enable_auto_updates_check: false/' /config/www/user/plugins/admin/admin.yaml -chown -R abc:abc \ +lsiown -R abc:abc \ /app \ - /config + /config/www diff --git a/root/etc/s6-overlay/s6-rc.d/init-grav-config/type b/root/etc/s6-overlay/s6-rc.d/init-grav-config/type new file mode 100644 index 0000000..bdd22a1 --- /dev/null +++ b/root/etc/s6-overlay/s6-rc.d/init-grav-config/type @@ -0,0 +1 @@ +oneshot diff --git a/root/etc/s6-overlay/s6-rc.d/init-grav-config/up b/root/etc/s6-overlay/s6-rc.d/init-grav-config/up new file mode 100644 index 0000000..7dad09b --- /dev/null +++ b/root/etc/s6-overlay/s6-rc.d/init-grav-config/up @@ -0,0 +1 @@ +/etc/s6-overlay/s6-rc.d/init-grav-config/run diff --git a/root/etc/s6-overlay/s6-rc.d/svc-cron/dependencies.d/init-services b/root/etc/s6-overlay/s6-rc.d/svc-cron/dependencies.d/init-services new file mode 100644 index 0000000..e69de29 diff --git a/root/etc/s6-overlay/s6-rc.d/svc-cron/run b/root/etc/s6-overlay/s6-rc.d/svc-cron/run new file mode 100755 index 0000000..254b7bd --- /dev/null +++ b/root/etc/s6-overlay/s6-rc.d/svc-cron/run @@ -0,0 +1,3 @@ +#!/usr/bin/with-contenv bash + +exec /usr/sbin/crond -f -S -l 5 diff --git a/root/etc/s6-overlay/s6-rc.d/svc-cron/type b/root/etc/s6-overlay/s6-rc.d/svc-cron/type new file mode 100644 index 0000000..5883cff --- /dev/null +++ b/root/etc/s6-overlay/s6-rc.d/svc-cron/type @@ -0,0 +1 @@ +longrun diff --git a/root/etc/s6-overlay/s6-rc.d/user/contents.d/init-grav-config b/root/etc/s6-overlay/s6-rc.d/user/contents.d/init-grav-config new file mode 100644 index 0000000..e69de29 diff --git a/root/etc/s6-overlay/s6-rc.d/user/contents.d/svc-cron b/root/etc/s6-overlay/s6-rc.d/user/contents.d/svc-cron new file mode 100644 index 0000000..e69de29 diff --git a/root/etc/services.d/cron/run b/root/etc/services.d/cron/run deleted file mode 100644 index 0c2d77a..0000000 --- a/root/etc/services.d/cron/run +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/with-contenv bash - -exec /usr/sbin/crond -f -S -l 5 \ No newline at end of file