Move setting HTTP_PROXY to variable

This commit is contained in:
Deon George 2024-01-24 21:33:42 +11:00
parent dc7c3edf21
commit 6ee61a7925
4 changed files with 4 additions and 4 deletions

View File

@ -5,7 +5,7 @@ arm64:build:
script:
- if [ -f init ]; then chmod 500 init; fi
- ([ -z "$REFRESH" -a -f docker/${CI_COMMIT_REF_SLUG} ]) && docker load < docker/${CI_COMMIT_REF_SLUG} || true
- docker build --build-arg HTTP_PROXY=http://proxy.dege.lan:3128 --cache-from ${CI_REGISTRY_IMAGE}:${VERSIONARCH} -t ${CI_REGISTRY_IMAGE}:${VERSIONARCH} .
- docker build ${HTTP_PROXY:+--build-arg HTTP_PROXY=${HTTP_PROXY}} --cache-from ${CI_REGISTRY_IMAGE}:${VERSIONARCH} -t ${CI_REGISTRY_IMAGE}:${VERSIONARCH} .
- docker push ${CI_REGISTRY_IMAGE}:${VERSIONARCH}
- docker save ${CI_REGISTRY_IMAGE}:${VERSIONARCH} > docker/${CI_COMMIT_REF_SLUG}
tags:

View File

@ -5,7 +5,7 @@ armv7l:build:
script:
- if [ -f init ]; then chmod 500 init; fi
- ([ -z "$REFRESH" -a -f docker/${CI_COMMIT_REF_SLUG} ]) && docker load < docker/${CI_COMMIT_REF_SLUG} || true
- docker build --build-arg HTTP_PROXY=http://proxy.dege.lan:3128 --cache-from ${CI_REGISTRY_IMAGE}:${VERSIONARCH} -t ${CI_REGISTRY_IMAGE}:${VERSIONARCH} .
- docker build ${HTTP_PROXY:+--build-arg HTTP_PROXY=${HTTP_PROXY}} --cache-from ${CI_REGISTRY_IMAGE}:${VERSIONARCH} -t ${CI_REGISTRY_IMAGE}:${VERSIONARCH} .
- docker push ${CI_REGISTRY_IMAGE}:${VERSIONARCH}
- docker save ${CI_REGISTRY_IMAGE}:${VERSIONARCH} > docker/${CI_COMMIT_REF_SLUG}
tags:

View File

@ -5,7 +5,7 @@ x86_64:build:
script:
- if [ -f init ]; then chmod 500 init; fi
- ([ -z "$REFRESH" -a -f docker/${CI_COMMIT_REF_SLUG} ]) && docker load < docker/${CI_COMMIT_REF_SLUG} || true
- docker build --build-arg HTTP_PROXY=http://proxy.dege.lan:3128 --cache-from ${CI_REGISTRY_IMAGE}:${VERSIONARCH} -t ${CI_REGISTRY_IMAGE}:${VERSIONARCH} .
- docker build ${HTTP_PROXY:+--build-arg HTTP_PROXY=${HTTP_PROXY}} --cache-from ${CI_REGISTRY_IMAGE}:${VERSIONARCH} -t ${CI_REGISTRY_IMAGE}:${VERSIONARCH} .
- docker push ${CI_REGISTRY_IMAGE}:${VERSIONARCH}
- docker save ${CI_REGISTRY_IMAGE}:${VERSIONARCH} > docker/${CI_COMMIT_REF_SLUG}
tags:

View File

@ -4,7 +4,7 @@
FROM nginx:alpine
# Change to http respositories, so they we can cache the install packages
RUN if [ -n ${HTTP_PROXY} ] ; then sed -i -e s'/https/http/' /etc/apk/repositories; fi
RUN if [ -n "${HTTP_PROXY}" ] ; then echo "Using HTTP PROXY [${HTTP_PROXY}]" && sed -i -e s'/https/http/' /etc/apk/repositories; fi
RUN apk add --no-cache nginx nginx-mod-mail bash