Use http proxy for Docker

This commit is contained in:
bandesz
2016-11-30 15:57:08 +00:00
parent 40cf6c049f
commit 07aa4cb0b0
3 changed files with 19 additions and 1 deletions

View File

@@ -1,10 +1,13 @@
FROM python:3.4-slim
ARG APT_HTTP_PROXY
ENV PYTHONUNBUFFERED=1 \
DEBIAN_FRONTEND=noninteractive
RUN \
echo "Install base packages" \
&& ([ -z "$APT_HTTP_PROXY" ] || echo "Acquire::http::Proxy \"${APT_HTTP_PROXY}\";\n" > /etc/apt/apt.conf.d/99HttpProxy) \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
make \

View File

@@ -7,4 +7,4 @@ help:
.PHONY: build-build-image
build-build-image:
docker build --pull -f Dockerfile-build -t govuk/notify-api-builder .
docker build --pull -f Dockerfile-build -t govuk/notify-api-builder --build-arg APT_HTTP_PROXY="${HTTP_PROXY}" .