Skip to content
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

Standard base #51

Merged
merged 17 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
61 changes: 30 additions & 31 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-php8
# syntax=docker/dockerfile:1

FROM ghcr.io/linuxserver/baseimage-alpine-nginx:3.17

# set version label
ARG BUILD_DATE
Expand All @@ -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 \
Expand All @@ -62,5 +57,9 @@ RUN \
/root/.composer \
/tmp/*

# add local files
# copy local files
COPY root/ /

# ports and volumes
EXPOSE 80 443
VOLUME /config
62 changes: 31 additions & 31 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-php8
# syntax=docker/dockerfile:1

FROM ghcr.io/linuxserver/baseimage-alpine-nginx:arm64v8-3.17

# set version label
ARG BUILD_DATE
Expand All @@ -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
62 changes: 31 additions & 31 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-php8
# syntax=docker/dockerfile:1

FROM ghcr.io/linuxserver/baseimage-alpine-nginx:arm32v7-3.17

# set version label
ARG BUILD_DATE
Expand All @@ -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
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,7 @@ pipeline {
-e DO_REGION="ams3" \
-e DO_BUCKET="lsio-ci" \
-t ghcr.io/linuxserver/ci:latest \
python /ci/ci.py'''
python3 test_build.py'''
}
}
}
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -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 |
Expand Down Expand Up @@ -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.
Expand Down
Loading