Skip to content

Rebase to alpine 3.17 with php8.1 #158

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jan 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 16 additions & 23 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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

# set version label
ARG BUILD_DATE
Expand All @@ -18,29 +20,22 @@ RUN \
apk add --no-cache \
fontconfig \
memcached \
php8-ctype \
php8-curl \
php8-dom \
php8-gd \
php8-ldap \
php8-mbstring \
php8-mysqlnd \
php8-openssl \
php8-pdo_mysql \
php8-pecl-memcached \
php8-phar \
php8-simplexml \
php8-tokenizer \
php81-ctype \
php81-curl \
php81-dom \
php81-gd \
php81-ldap \
php81-mysqlnd \
php81-pdo_mysql \
php81-pecl-memcached \
php81-phar \
php81-tokenizer \
qt5-qtbase \
tar \
ttf-freefont && \
apk add --no-cache \
--repository=http://dl-cdn.alpinelinux.org/alpine/v3.14/community \
wkhtmltopdf && \
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 "**** fetch bookstack ****" && \
mkdir -p\
/app/www && \
Expand All @@ -56,8 +51,6 @@ RUN \
/app/www/ --strip-components=1 && \
echo "**** install composer dependencies ****" && \
composer install -d /app/www/ && \
echo "**** overlay-fs bug workaround ****" && \
mv /app/www /app/www-tmp && \
echo "**** cleanup ****" && \
apk del --purge \
build-dependencies && \
Expand Down
39 changes: 16 additions & 23 deletions Dockerfile.aarch64
Original file line number Diff line number Diff line change
@@ -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

# set version label
ARG BUILD_DATE
Expand All @@ -18,29 +20,22 @@ RUN \
apk add --no-cache \
fontconfig \
memcached \
php8-ctype \
php8-curl \
php8-dom \
php8-gd \
php8-ldap \
php8-mbstring \
php8-mysqlnd \
php8-openssl \
php8-pdo_mysql \
php8-pecl-memcached \
php8-phar \
php8-simplexml \
php8-tokenizer \
php81-ctype \
php81-curl \
php81-dom \
php81-gd \
php81-ldap \
php81-mysqlnd \
php81-pdo_mysql \
php81-pecl-memcached \
php81-phar \
php81-tokenizer \
qt5-qtbase \
tar \
ttf-freefont && \
apk add --no-cache \
--repository=http://dl-cdn.alpinelinux.org/alpine/v3.14/community \
wkhtmltopdf && \
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 "**** fetch bookstack ****" && \
mkdir -p\
/app/www && \
Expand All @@ -56,8 +51,6 @@ RUN \
/app/www/ --strip-components=1 && \
echo "**** install composer dependencies ****" && \
composer install -d /app/www/ && \
echo "**** overlay-fs bug workaround ****" && \
mv /app/www /app/www-tmp && \
echo "**** cleanup ****" && \
apk del --purge \
build-dependencies && \
Expand Down
39 changes: 16 additions & 23 deletions Dockerfile.armhf
Original file line number Diff line number Diff line change
@@ -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

# set version label
ARG BUILD_DATE
Expand All @@ -18,29 +20,22 @@ RUN \
apk add --no-cache \
fontconfig \
memcached \
php8-ctype \
php8-curl \
php8-dom \
php8-gd \
php8-ldap \
php8-mbstring \
php8-mysqlnd \
php8-openssl \
php8-pdo_mysql \
php8-pecl-memcached \
php8-phar \
php8-simplexml \
php8-tokenizer \
php81-ctype \
php81-curl \
php81-dom \
php81-gd \
php81-ldap \
php81-mysqlnd \
php81-pdo_mysql \
php81-pecl-memcached \
php81-phar \
php81-tokenizer \
qt5-qtbase \
tar \
ttf-freefont && \
apk add --no-cache \
--repository=http://dl-cdn.alpinelinux.org/alpine/v3.14/community \
wkhtmltopdf && \
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 "**** fetch bookstack ****" && \
mkdir -p\
/app/www && \
Expand All @@ -56,8 +51,6 @@ RUN \
/app/www/ --strip-components=1 && \
echo "**** install composer dependencies ****" && \
composer install -d /app/www/ && \
echo "**** overlay-fs bug workaround ****" && \
mv /app/www /app/www-tmp && \
echo "**** cleanup ****" && \
apk del --purge \
build-dependencies && \
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64

## Versions

* **19.01.23:** - Rebase to alpine 3.17 with php8.1.
* **16.01.23:** - Wrap `.env` values in quotes.
* **05.01.23:** - Fix db password setting (sed escape `&`).
* **21.12.22:** - Update db info in .env file when env vars are updated.
Expand Down
1 change: 1 addition & 0 deletions readme-vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ app_setup_block: |

# changelog
changelogs:
- { date: "19.01.23:", desc: "Rebase to alpine 3.17 with php8.1." }
- { date: "16.01.23:", desc: "Wrap `.env` values in quotes." }
- { date: "05.01.23:", desc: "Fix db password setting (sed escape `&`)." }
- { date: "21.12.22:", desc: "Update db info in .env file when env vars are updated." }
Expand Down
11 changes: 3 additions & 8 deletions root/etc/cont-init.d/50-config → ...overlay/s6-rc.d/init-bookstack-config/run
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
#!/usr/bin/with-contenv bash
# shellcheck shell=bash

if [ -d /app/www-tmp ]; then
echo "New container detected. Setting up app folder and fixing permissions."
mv /app/www-tmp /app/www
chown -R abc:abc /app/www
fi

# create directory structure
mkdir -p \
/config/www/{uploads,files,images,themes}
Expand Down Expand Up @@ -145,8 +139,9 @@ if [ -z "${CI_RUN+x}" ]; then
php /app/www/artisan migrate --force
fi

# set permissions
chown -R abc:abc \
# permissions
lsiown -R abc:abc \
/app/www/storage \
/config

# set lockfile to avoid DB waits for this specific container
Expand Down
1 change: 1 addition & 0 deletions root/etc/s6-overlay/s6-rc.d/init-bookstack-config/type
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
oneshot
1 change: 1 addition & 0 deletions root/etc/s6-overlay/s6-rc.d/init-bookstack-config/up
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/etc/s6-overlay/s6-rc.d/init-bookstack-config/run
Empty file.
File renamed without changes.
1 change: 1 addition & 0 deletions root/etc/s6-overlay/s6-rc.d/svc-memcached/type
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
longrun
Empty file.
Empty file.