build: bail out upon any error in docker builds

Signed-off-by: nachoparker <nacho@ownyourbits.com>
This commit is contained in:
nachoparker 2021-05-09 13:45:59 -06:00
parent 67aa5994d6
commit bd0c23d9f9
4 changed files with 4 additions and 2 deletions

View File

@ -85,7 +85,7 @@ configure()
{
## IF BETA SELECTED ADD "pre" to DOWNLOAD PATH
[[ "$BETA" == yes ]] && local PREFIX="pre"
## DOWNLOAD AND (OVER)WRITE NEXTCLOUD
cd /var/www/

View File

@ -13,6 +13,7 @@ ENV DOCKERBUILD 1
COPY etc/ncp.cfg etc/library.sh lamp.sh /usr/local/etc/
RUN --mount=type=cache,target=/var/cache/apt --mount=type=cache,target=/var/lib/apt \
set -e; \
# installation
apt-get update; \

View File

@ -15,6 +15,7 @@ COPY bin/ncp/CONFIG/nc-nextcloud.sh /
COPY etc/ncp-config.d/nc-nextcloud.cfg /usr/local/etc/ncp-config.d/
RUN --mount=type=cache,target=/var/cache/apt --mount=type=cache,target=/var/lib/apt \
set -e; \
# mark as image build
touch /.ncp-image; \
@ -23,7 +24,6 @@ touch /.ncp-image; \
apt-get update; \
apt-get install --no-install-recommends -y wget ca-certificates sudo jq; \
source /usr/local/etc/library.sh; \
set +x; \
install_app /nc-nextcloud.sh; \
run_app_unsafe /nc-nextcloud.sh; \
mv /var/www/nextcloud /data-ro/nextcloud; \

View File

@ -23,6 +23,7 @@ COPY docker /tmp/ncp-build/docker/
COPY etc/ncp-config.d/nc-init.cfg /usr/local/etc/ncp-config.d/nc-init-copy.cfg
RUN --mount=type=cache,target=/var/cache/apt --mount=type=cache,target=/var/lib/apt \
set -e; \
# make sure we don't accidentally disable first run wizard
rm -f ncp-web/{wizard.cfg,ncp-web.cfg}; \