Skip to content

Commit 4e8d549

Browse files
author
Homerr
committed
Merge branch 'dockerfile-updates' of https://github.com/linuxserver/docker-bookstack into dockerfile-updates
2 parents 831050f + 3580247 commit 4e8d549

File tree

3 files changed

+27
-17
lines changed

3 files changed

+27
-17
lines changed

Diff for: Dockerfile.aarch64

+9-5
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ COPY qemu-aarch64-static /usr/bin
77
# set version label
88
ARG BUILD_DATE
99
ARG VERSION
10+
ARG BOOKSTACK_RELEASE
1011
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
1112
LABEL maintainer="homerr"
1213

@@ -36,14 +37,17 @@ echo "**** configure php-fpm to pass env vars ****" && \
3637

3738
echo "**** get bookstack ****" && \
3839

39-
BSAPP_VER="$(curl -sX GET https://api.github.com/repos/BookStackApp/BookStack/releases/latest | grep 'tag_name' | cut -d\" -f4)" && \
40-
4140
mkdir -p\
4241
/var/www/html && \
4342

43+
if [ -z ${BOOKSTACK_RELEASE+x} ]; then \
44+
BOOKSTACK_RELEASE=$(curl -sX GET "https://api.github.com/repos/bookstackapp/bookstack/releases/latest" \
45+
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
46+
fi && \
47+
4448
curl -o \
45-
/tmp/bookstack.tar.gz -L \
46-
"https://github.com/BookStackApp/BookStack/archive/${BSAPP_VER}.tar.gz" && \
49+
/tmp/bookstack.tar.gz -L \
50+
"https://github.com/BookStackApp/BookStack/archive/${BOOKSTACK_RELEASE}.tar.gz" && \
4751

4852
tar xf \
4953
/tmp/bookstack.tar.gz -C \
@@ -57,7 +61,7 @@ cd /tmp && \
5761
curl -sS https://getcomposer.org/installer | php && \
5862
mv /tmp/composer.phar /usr/local/bin/composer && \
5963

60-
echo "**** run composer install ****"
64+
echo "**** run composer install ****" && \
6165

6266
composer install -d /var/www/html/ && \
6367

Diff for: Dockerfile.amd64

+9-7
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
# using ideas/code from other sparklyballs templates
2-
# set variable to get archive based on github api data (sparklyballs heimdall inspiration)
3-
1+
# using ideas/code from other thelamer & sparklyballs lsio templates
42
FROM lsiobase/alpine.nginx:3.7
53

64
# set version label
75
ARG BUILD_DATE
86
ARG VERSION
7+
ARG BOOKSTACK_RELEASE
98
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
109
LABEL maintainer="homerr"
1110

@@ -35,14 +34,17 @@ echo "**** configure php-fpm to pass env vars ****" && \
3534

3635
echo "**** get bookstack ****" && \
3736

38-
BSAPP_VER="$(curl -sX GET https://api.github.com/repos/BookStackApp/BookStack/releases/latest | grep 'tag_name' | cut -d\" -f4)" && \
39-
4037
mkdir -p\
4138
/var/www/html && \
4239

40+
if [ -z ${BOOKSTACK_RELEASE+x} ]; then \
41+
BOOKSTACK_RELEASE=$(curl -sX GET "https://api.github.com/repos/bookstackapp/bookstack/releases/latest" \
42+
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
43+
fi && \
44+
4345
curl -o \
4446
/tmp/bookstack.tar.gz -L \
45-
"https://github.com/BookStackApp/BookStack/archive/${BSAPP_VER}.tar.gz" && \
47+
"https://github.com/BookStackApp/BookStack/archive/${BOOKSTACK_RELEASE}.tar.gz" && \
4648

4749
tar xf \
4850
/tmp/bookstack.tar.gz -C \
@@ -56,7 +58,7 @@ cd /tmp && \
5658
curl -sS https://getcomposer.org/installer | php && \
5759
mv /tmp/composer.phar /usr/local/bin/composer && \
5860

59-
echo "**** run composer install ****"
61+
echo "**** run composer install ****" && \
6062

6163
composer install -d /var/www/html/ && \
6264

Diff for: Dockerfile.armhf

+9-5
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ COPY qemu-arm-static /usr/bin
77
# set version label
88
ARG BUILD_DATE
99
ARG VERSION
10+
ARG BOOKSTACK_RELEASE
1011
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
1112
LABEL maintainer="homerr"
1213

@@ -36,14 +37,17 @@ echo "**** configure php-fpm to pass env vars ****" && \
3637

3738
echo "**** get bookstack ****" && \
3839

39-
BSAPP_VER="$(curl -sX GET https://api.github.com/repos/BookStackApp/BookStack/releases/latest | grep 'tag_name' | cut -d\" -f4)" && \
40-
4140
mkdir -p\
4241
/var/www/html && \
4342

43+
if [ -z ${BOOKSTACK_RELEASE+x} ]; then \
44+
BOOKSTACK_RELEASE=$(curl -sX GET "https://api.github.com/repos/bookstackapp/bookstack/releases/latest" \
45+
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
46+
fi && \
47+
4448
curl -o \
45-
/tmp/bookstack.tar.gz -L \
46-
"https://github.com/BookStackApp/BookStack/archive/${BSAPP_VER}.tar.gz" && \
49+
/tmp/bookstack.tar.gz -L \
50+
"https://github.com/BookStackApp/BookStack/archive/${BOOKSTACK_RELEASE}.tar.gz" && \
4751

4852
tar xf \
4953
/tmp/bookstack.tar.gz -C \
@@ -57,7 +61,7 @@ cd /tmp && \
5761
curl -sS https://getcomposer.org/installer | php && \
5862
mv /tmp/composer.phar /usr/local/bin/composer && \
5963

60-
echo "**** run composer install ****"
64+
echo "**** run composer install ****" && \
6165

6266
composer install -d /var/www/html/ && \
6367

0 commit comments

Comments
 (0)