diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 new file mode 100644 index 0000000..72aeb88 --- /dev/null +++ b/Dockerfile.aarch64 @@ -0,0 +1,73 @@ +# using ideas/code from other sparklyballs templates +# set variable to get archive based on github api data (sparklyballs heimdall inspiration) + +FROM lsiobase/alpine.nginx.arm64:3.7 +# Add qemu to build on x86_64 systems +COPY qemu-aarch64-static /usr/bin +# set version label +ARG BUILD_DATE +ARG VERSION +LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}" +LABEL maintainer="homerr" + +# install packages +RUN \ +echo "**** install build packages ****" && \ +apk add --no-cache \ + curl \ + php7-openssl \ + php7-pdo_mysql \ + php7-mbstring \ + php7-tidy \ + php7-phar \ + php7-dom \ + php7-tokenizer \ + php7-gd \ + php7-mysqlnd \ + php7-tidy \ + php7-simplexml \ + tar && \ + +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 && \ + +echo "**** get bookstack ****" && \ + +BSAPP_VER="$(curl -sX GET https://api.github.com/repos/BookStackApp/BookStack/releases/latest | grep 'tag_name' | cut -d\" -f4)" && \ + +mkdir -p\ + /var/www/html && \ + +curl -o \ +/tmp/bookstack.tar.gz -L \ + "https://github.com/BookStackApp/BookStack/archive/${BSAPP_VER}.tar.gz" && \ + +tar xf \ +/tmp/bookstack.tar.gz -C \ + /var/www/html/ --strip-components=1 && \ + +cp /var/www/html/.env.example /var/www/html/.env && \ + +echo "**** get composer ****" && \ + +cd /tmp && \ + curl -sS https://getcomposer.org/installer | php && \ + mv /tmp/composer.phar /usr/local/bin/composer && \ + +echo "**** run composer install ****" + +composer install -d /var/www/html/ && \ + +echo "**** cleanup ****" && \ +rm -rf \ + /root/.composer \ + /tmp/* + +# copy local files +COPY root/ / + +# ports and volumes +VOLUME /config diff --git a/Dockerfile b/Dockerfile.amd64 similarity index 100% rename from Dockerfile rename to Dockerfile.amd64 diff --git a/Dockerfile.armhf b/Dockerfile.armhf new file mode 100644 index 0000000..6091cfb --- /dev/null +++ b/Dockerfile.armhf @@ -0,0 +1,73 @@ +# using ideas/code from other sparklyballs templates +# set variable to get archive based on github api data (sparklyballs heimdall inspiration) + +FROM lsiobase/alpine.nginx.armhf:3.7 +# Add qemu to build on x86_64 systems +COPY qemu-arm-static /usr/bin +# set version label +ARG BUILD_DATE +ARG VERSION +LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}" +LABEL maintainer="homerr" + +# install packages +RUN \ +echo "**** install build packages ****" && \ +apk add --no-cache \ + curl \ + php7-openssl \ + php7-pdo_mysql \ + php7-mbstring \ + php7-tidy \ + php7-phar \ + php7-dom \ + php7-tokenizer \ + php7-gd \ + php7-mysqlnd \ + php7-tidy \ + php7-simplexml \ + tar && \ + +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 && \ + +echo "**** get bookstack ****" && \ + +BSAPP_VER="$(curl -sX GET https://api.github.com/repos/BookStackApp/BookStack/releases/latest | grep 'tag_name' | cut -d\" -f4)" && \ + +mkdir -p\ + /var/www/html && \ + +curl -o \ +/tmp/bookstack.tar.gz -L \ + "https://github.com/BookStackApp/BookStack/archive/${BSAPP_VER}.tar.gz" && \ + +tar xf \ +/tmp/bookstack.tar.gz -C \ + /var/www/html/ --strip-components=1 && \ + +cp /var/www/html/.env.example /var/www/html/.env && \ + +echo "**** get composer ****" && \ + +cd /tmp && \ + curl -sS https://getcomposer.org/installer | php && \ + mv /tmp/composer.phar /usr/local/bin/composer && \ + +echo "**** run composer install ****" + +composer install -d /var/www/html/ && \ + +echo "**** cleanup ****" && \ +rm -rf \ + /root/.composer \ + /tmp/* + +# copy local files +COPY root/ / + +# ports and volumes +VOLUME /config diff --git a/qemu-aarch64-static b/qemu-aarch64-static new file mode 100644 index 0000000..6c9be84 Binary files /dev/null and b/qemu-aarch64-static differ diff --git a/qemu-arm-static b/qemu-arm-static new file mode 100644 index 0000000..9a61d8d Binary files /dev/null and b/qemu-arm-static differ