From a715d95fb0d3e50170f90a3783b77065446a7394 Mon Sep 17 00:00:00 2001 From: Chris Wood Date: Sun, 25 Aug 2024 23:25:23 +0100 Subject: [PATCH] fix build --- .docker/dockerfiles/base.Dockerfile | 2 +- .docker/dockerfiles/dev.Dockerfile | 2 +- .docker/dockerfiles/worker-dependencies.Dockerfile | 2 +- tasks | 2 ++ 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.docker/dockerfiles/base.Dockerfile b/.docker/dockerfiles/base.Dockerfile index fa9dc350..0e4dcaa4 100644 --- a/.docker/dockerfiles/base.Dockerfile +++ b/.docker/dockerfiles/base.Dockerfile @@ -46,7 +46,7 @@ RUN yarn install --production=true && \ rm -rf /usr/local/share/.cache/yarn ARG MAX_MIND_LICENSE -RUN curl "https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-City&license_key=$MAX_MIND_LICENSE&suffix=tar.gz" -o ./GeoLite2-City.tar.gz && \ +RUN curl -L "https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-City&license_key=$MAX_MIND_LICENSE&suffix=tar.gz" -o ./GeoLite2-City.tar.gz && \ gzip -d GeoLite2-City.tar.gz && \ tar -xvf GeoLite2-City.tar && \ mkdir -p /var/opt/maxmind/ && \ diff --git a/.docker/dockerfiles/dev.Dockerfile b/.docker/dockerfiles/dev.Dockerfile index 154c299f..0b7067dc 100644 --- a/.docker/dockerfiles/dev.Dockerfile +++ b/.docker/dockerfiles/dev.Dockerfile @@ -39,7 +39,7 @@ ENV BUNDLE_PATH=$BUNDLE_PATH \ ENV PATH=$BUNDLE_PATH/bin:$APP_HOME/node_modules/.bin:$PATH ARG MAX_MIND_LICENSE -RUN curl "https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-City&license_key=$MAX_MIND_LICENSE&suffix=tar.gz" -o ./GeoLite2-City.tar.gz && \ +RUN curl -L "https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-City&license_key=$MAX_MIND_LICENSE&suffix=tar.gz" -o ./GeoLite2-City.tar.gz && \ gzip -d GeoLite2-City.tar.gz && \ tar -xvf GeoLite2-City.tar && \ mkdir -p /var/opt/maxmind/ && \ diff --git a/.docker/dockerfiles/worker-dependencies.Dockerfile b/.docker/dockerfiles/worker-dependencies.Dockerfile index 3901316e..c4b2d814 100644 --- a/.docker/dockerfiles/worker-dependencies.Dockerfile +++ b/.docker/dockerfiles/worker-dependencies.Dockerfile @@ -3,7 +3,7 @@ # Create Server NodeJS Assets # ================ -FROM alpine:3.18 as server-nodejs-assets +FROM alpine:3.18 AS server-nodejs-assets ENV RAILS_ENV=production \ NODE_ENV=production \ diff --git a/tasks b/tasks index c435534b..0c4ed935 100755 --- a/tasks +++ b/tasks @@ -101,10 +101,12 @@ function build-all-images { function build-images-base { source ./config/env/build_args.env [ -z "$GRECAPTCHA_SITE_KEY" ] && echo "GRECAPTCHA_SITE_KEY empty, set in config/env/build_args.env" && exit 1 + [ -z "$MAX_MIND_LICENSE" ] && echo "MAX_MIND_LICENSE empty, set in config/env/build_args.env" && exit 1 GIT_SHA="$(git rev-parse HEAD | head -c8)" docker build \ + --build-arg MAX_MIND_LICENSE="$MAX_MIND_LICENSE" \ --build-arg grecaptcha_site_key="$GRECAPTCHA_SITE_KEY" \ -t cpcwood/home-server-base:latest \ -t cpcwood/home-server-base:"$GIT_SHA" \