File tree Expand file tree Collapse file tree 3 files changed +27
-17
lines changed Expand file tree Collapse file tree 3 files changed +27
-17
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ COPY qemu-aarch64-static /usr/bin
77# set version label
88ARG BUILD_DATE
99ARG VERSION
10+ ARG BOOKSTACK_RELEASE
1011LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
1112LABEL maintainer="homerr"
1213
@@ -36,14 +37,17 @@ echo "**** configure php-fpm to pass env vars ****" && \
3637
3738echo "**** 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-
4140mkdir -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+
4448curl -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
4852tar 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
6266composer install -d /var/www/html/ && \
6367
Original file line number Diff line number Diff line change 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
42FROM lsiobase/alpine.nginx:3.7
53
64# set version label
75ARG BUILD_DATE
86ARG VERSION
7+ ARG BOOKSTACK_RELEASE
98LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
109LABEL maintainer="homerr"
1110
@@ -35,14 +34,17 @@ echo "**** configure php-fpm to pass env vars ****" && \
3534
3635echo "**** 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-
4037mkdir -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+
4345curl -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
4749tar 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
6163composer install -d /var/www/html/ && \
6264
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ COPY qemu-arm-static /usr/bin
77# set version label
88ARG BUILD_DATE
99ARG VERSION
10+ ARG BOOKSTACK_RELEASE
1011LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
1112LABEL maintainer="homerr"
1213
@@ -36,14 +37,17 @@ echo "**** configure php-fpm to pass env vars ****" && \
3637
3738echo "**** 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-
4140mkdir -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+
4448curl -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
4852tar 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
6266composer install -d /var/www/html/ && \
6367
You can’t perform that action at this time.
0 commit comments