Skip to content

Commit

Permalink
Use standard nginx.conf from lsio alpine nginx base image
Browse files Browse the repository at this point in the history
  • Loading branch information
nemchik committed Aug 20, 2022
1 parent 67b9d0a commit 556130a
Show file tree
Hide file tree
Showing 12 changed files with 234 additions and 171 deletions.
68 changes: 34 additions & 34 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ghcr.io/linuxserver/baseimage-alpine-nginx:3.14
FROM ghcr.io/linuxserver/baseimage-alpine-nginx:3.15

# set version label
ARG BUILD_DATE
Expand All @@ -8,60 +8,60 @@ LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DA
LABEL maintainer="TheLamer"

RUN \
echo "**** install build packages ****" && \
apk add --no-cache --virtual=build-dependencies \
composer && \
echo "**** install runtime packages ****" && \
apk add --no-cache \
curl \
libxml2 \
mariadb-client \
php7-bcmath \
php7-ctype \
php7-curl \
php7-gd \
php7-iconv \
php7-ldap \
php7-mbstring \
php7-mcrypt \
php7-phar \
php7-pdo_mysql \
php7-pdo_sqlite \
php7-sodium \
php7-sqlite3 \
php7-tokenizer \
php7-xml \
php7-xmlreader \
php7-zip \
php8-bcmath \
php8-ctype \
php8-curl \
php8-gd \
php8-iconv \
php8-ldap \
php8-mbstring \
php8-pdo_mysql \
php8-pdo_sqlite \
php8-pecl-mcrypt \
php8-phar \
php8-sodium \
php8-sqlite3 \
php8-tokenizer \
php8-xml \
php8-xmlreader \
php8-zip \
tar \
unzip && \
echo "**** configure php-fpm to pass env vars ****" && \
sed -i \
's/;clear_env = no/clear_env = no/g' \
/etc/php7/php-fpm.d/www.conf && \
echo "env[PATH] = /usr/local/bin:/usr/bin:/bin" >> /etc/php7/php-fpm.conf && \
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 && \
echo "**** install snipe-it ****" && \
mkdir -p \
/var/www/html/ && \
/app/www/ && \
if [ -z ${SNIPEIT_RELEASE+x} ]; then \
SNIPEIT_RELEASE=$(curl -sX GET "https://api.github.com/repos/snipe/snipe-it/releases/latest" \
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
fi && \
curl -o \
/tmp/snipeit.tar.gz -L \
/tmp/snipeit.tar.gz -L \
"https://github.com/snipe/snipe-it/archive/${SNIPEIT_RELEASE}.tar.gz" && \
tar xf \
/tmp/snipeit.tar.gz -C \
/var/www/html/ --strip-components=1 && \
cp /var/www/html/docker/docker.env /var/www/html/.env && \
echo "**** install dependencies ****" && \
cd /tmp && \
curl -sS https://getcomposer.org/installer | php && \
mv /tmp/composer.phar /usr/local/bin/composer && \
composer install --no-dev -d /var/www/html && \
/app/www/ --strip-components=1 && \
cp /app/www/docker/docker.env /app/www/.env && \
composer install --no-dev -d /app/www && \
echo "**** move storage directories to defaults ****" && \
mv \
"/var/www/html/storage" \
"/var/www/html/public/uploads" \
/defaults/ && \
"/app/www/storage" \
"/app/www/public/uploads" \
/defaults/ && \
echo "**** cleanup ****" && \
apk del --purge \
build-dependencies && \
rm -rf \
/root/.composer \
/tmp/*
Expand Down
68 changes: 34 additions & 34 deletions Dockerfile.aarch64
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ghcr.io/linuxserver/baseimage-alpine-nginx:arm64v8-3.14
FROM ghcr.io/linuxserver/baseimage-alpine-nginx:arm64v8-3.15

# set version label
ARG BUILD_DATE
Expand All @@ -8,60 +8,60 @@ LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DA
LABEL maintainer="TheLamer"

RUN \
echo "**** install build packages ****" && \
apk add --no-cache --virtual=build-dependencies \
composer && \
echo "**** install runtime packages ****" && \
apk add --no-cache \
curl \
libxml2 \
mariadb-client \
php7-bcmath \
php7-ctype \
php7-curl \
php7-gd \
php7-iconv \
php7-ldap \
php7-mbstring \
php7-mcrypt \
php7-phar \
php7-pdo_mysql \
php7-pdo_sqlite \
php7-sodium \
php7-sqlite3 \
php7-tokenizer \
php7-xml \
php7-xmlreader \
php7-zip \
php8-bcmath \
php8-ctype \
php8-curl \
php8-gd \
php8-iconv \
php8-ldap \
php8-mbstring \
php8-pdo_mysql \
php8-pdo_sqlite \
php8-pecl-mcrypt \
php8-phar \
php8-sodium \
php8-sqlite3 \
php8-tokenizer \
php8-xml \
php8-xmlreader \
php8-zip \
tar \
unzip && \
echo "**** configure php-fpm to pass env vars ****" && \
sed -i \
's/;clear_env = no/clear_env = no/g' \
/etc/php7/php-fpm.d/www.conf && \
echo "env[PATH] = /usr/local/bin:/usr/bin:/bin" >> /etc/php7/php-fpm.conf && \
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 && \
echo "**** install snipe-it ****" && \
mkdir -p \
/var/www/html/ && \
/app/www/ && \
if [ -z ${SNIPEIT_RELEASE+x} ]; then \
SNIPEIT_RELEASE=$(curl -sX GET "https://api.github.com/repos/snipe/snipe-it/releases/latest" \
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
fi && \
curl -o \
/tmp/snipeit.tar.gz -L \
/tmp/snipeit.tar.gz -L \
"https://github.com/snipe/snipe-it/archive/${SNIPEIT_RELEASE}.tar.gz" && \
tar xf \
/tmp/snipeit.tar.gz -C \
/var/www/html/ --strip-components=1 && \
cp /var/www/html/docker/docker.env /var/www/html/.env && \
echo "**** install dependencies ****" && \
cd /tmp && \
curl -sS https://getcomposer.org/installer | php && \
mv /tmp/composer.phar /usr/local/bin/composer && \
composer install --no-dev -d /var/www/html && \
/app/www/ --strip-components=1 && \
cp /app/www/docker/docker.env /app/www/.env && \
composer install --no-dev -d /app/www && \
echo "**** move storage directories to defaults ****" && \
mv \
"/var/www/html/storage" \
"/var/www/html/public/uploads" \
/defaults/ && \
"/app/www/storage" \
"/app/www/public/uploads" \
/defaults/ && \
echo "**** cleanup ****" && \
apk del --purge \
build-dependencies && \
rm -rf \
/root/.composer \
/tmp/*
Expand Down
68 changes: 34 additions & 34 deletions Dockerfile.armhf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ghcr.io/linuxserver/baseimage-alpine-nginx:arm32v7-3.14
FROM ghcr.io/linuxserver/baseimage-alpine-nginx:arm32v7-3.15

# set version label
ARG BUILD_DATE
Expand All @@ -8,60 +8,60 @@ LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DA
LABEL maintainer="TheLamer"

RUN \
echo "**** install build packages ****" && \
apk add --no-cache --virtual=build-dependencies \
composer && \
echo "**** install runtime packages ****" && \
apk add --no-cache \
curl \
libxml2 \
mariadb-client \
php7-bcmath \
php7-ctype \
php7-curl \
php7-gd \
php7-iconv \
php7-ldap \
php7-mbstring \
php7-mcrypt \
php7-phar \
php7-pdo_mysql \
php7-pdo_sqlite \
php7-sodium \
php7-sqlite3 \
php7-tokenizer \
php7-xml \
php7-xmlreader \
php7-zip \
php8-bcmath \
php8-ctype \
php8-curl \
php8-gd \
php8-iconv \
php8-ldap \
php8-mbstring \
php8-pdo_mysql \
php8-pdo_sqlite \
php8-pecl-mcrypt \
php8-phar \
php8-sodium \
php8-sqlite3 \
php8-tokenizer \
php8-xml \
php8-xmlreader \
php8-zip \
tar \
unzip && \
echo "**** configure php-fpm to pass env vars ****" && \
sed -i \
's/;clear_env = no/clear_env = no/g' \
/etc/php7/php-fpm.d/www.conf && \
echo "env[PATH] = /usr/local/bin:/usr/bin:/bin" >> /etc/php7/php-fpm.conf && \
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 && \
echo "**** install snipe-it ****" && \
mkdir -p \
/var/www/html/ && \
/app/www/ && \
if [ -z ${SNIPEIT_RELEASE+x} ]; then \
SNIPEIT_RELEASE=$(curl -sX GET "https://api.github.com/repos/snipe/snipe-it/releases/latest" \
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
fi && \
curl -o \
/tmp/snipeit.tar.gz -L \
/tmp/snipeit.tar.gz -L \
"https://github.com/snipe/snipe-it/archive/${SNIPEIT_RELEASE}.tar.gz" && \
tar xf \
/tmp/snipeit.tar.gz -C \
/var/www/html/ --strip-components=1 && \
cp /var/www/html/docker/docker.env /var/www/html/.env && \
echo "**** install dependencies ****" && \
cd /tmp && \
curl -sS https://getcomposer.org/installer | php && \
mv /tmp/composer.phar /usr/local/bin/composer && \
composer install --no-dev -d /var/www/html && \
/app/www/ --strip-components=1 && \
cp /app/www/docker/docker.env /app/www/.env && \
composer install --no-dev -d /app/www && \
echo "**** move storage directories to defaults ****" && \
mv \
"/var/www/html/storage" \
"/var/www/html/public/uploads" \
/defaults/ && \
"/app/www/storage" \
"/app/www/public/uploads" \
/defaults/ && \
echo "**** cleanup ****" && \
apk del --purge \
build-dependencies && \
rm -rf \
/root/.composer \
/tmp/*
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64

## Versions

* **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)).
* **14.05.22:** - Add php7-sodium for v6.
* **12.04.22:** - Don't build development elements.
* **02.03.22:** - Rework init logic, do not show default compose.
Expand Down
25 changes: 12 additions & 13 deletions package_versions.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
alpine-baselayout-3.2.0-r16
alpine-keys-2.4-r0
apache2-utils-2.4.54-r0
apache2-utils-2.4.51-r0
apk-tools-2.12.7-r0
apr-1.7.0-r1
apr-util-1.6.1-r7
argon2-libs-20190702-r1
bash-5.1.16-r0
brotli-libs-1.0.9-r5
busybox-1.33.1-r8
ca-certificates-20220614-r0
ca-certificates-bundle-20220614-r0
busybox-1.33.1-r6
ca-certificates-20191127-r5
ca-certificates-bundle-20191127-r5
coreutils-8.32-r2
curl-7.79.1-r2
expat-2.4.7-r0
Expand Down Expand Up @@ -42,7 +42,7 @@ libsm-1.2.3-r0
libsodium-1.0.18-r0
libssl1.1-1.1.1q-r0
libstdc++-10.3.1_git20210424-r2
libuuid-2.37.4-r0
libuuid-2.37.2-r0
libwebp-1.2.0-r2
libx11-1.7.2-r0
libxau-1.0.9-r0
Expand All @@ -54,20 +54,20 @@ libxpm-3.5.13-r0
libxt-1.2.1-r0
libzip-1.7.3-r2
linux-pam-1.5.1-r1
logrotate-3.18.1-r3
mariadb-client-10.5.16-r0
mariadb-common-10.5.16-r0
logrotate-3.18.1-r0
mariadb-client-10.5.13-r0
mariadb-common-10.5.13-r0
musl-1.2.2-r3
musl-utils-1.2.2-r3
nano-5.7-r2
ncurses-libs-6.2_p20210612-r1
ncurses-terminfo-base-6.2_p20210612-r1
nghttp2-libs-1.43.0-r0
nginx-1.20.2-r1
nginx-1.20.2-r0
oniguruma-6.9.7.1-r0
openssl-1.1.1q-r0
pcre-8.44-r0
pcre2-10.36-r1
pcre2-10.36-r0
php7-7.4.26-r0
php7-bcmath-7.4.26-r0
php7-common-7.4.26-r0
Expand All @@ -90,7 +90,6 @@ php7-pecl-mcrypt-1.0.4-r0
php7-phar-7.4.26-r0
php7-session-7.4.26-r0
php7-simplexml-7.4.26-r0
php7-sodium-7.4.26-r0
php7-sqlite3-7.4.26-r0
php7-tokenizer-7.4.26-r0
php7-xml-7.4.26-r0
Expand All @@ -105,9 +104,9 @@ scanelf-1.3.2-r0
shadow-4.8.1-r0
skalibs-2.10.0.3-r0
sqlite-libs-3.35.5-r0
ssl_client-1.33.1-r8
ssl_client-1.33.1-r6
tar-1.34-r0
tzdata-2022a-r0
tzdata-2021e-r0
unzip-6.0-r9
utmps-0.1.0.2-r0
xz-5.2.5-r1
Expand Down
1 change: 1 addition & 0 deletions readme-vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ app_setup_block: |
# changelog
changelogs:
- { 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: "14.05.22:", desc: "Add php7-sodium for v6." }
- { date: "12.04.22:", desc: "Don't build development elements." }
- { date: "02.03.22:", desc: "Rework init logic, do not show default compose." }
Expand Down
Loading

0 comments on commit 556130a

Please sign in to comment.