Skip to content

Commit 7d3d19a

Browse files
committed
configure apt-get to use http_proxy if required
1 parent ee2be46 commit 7d3d19a

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

cron/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
ARG BASE_IMAGE
22
FROM ${BASE_IMAGE}
33
USER 0
4+
RUN if [ -z "${http_proxy}" ]; then echo "Acquire::http::proxy \"${http_proxy}\";" >> /etc/apt/apt.conf; fi
5+
RUN if [ -z "${https_proxy}" ]; then echo "Acquire::https::proxy \"${https_proxy}\";" >> /etc/apt/apt.conf; fi
46
RUN apt-get update && apt-get install -y --no-install-recommends cron && \
57
rm -r /var/lib/apt/lists/*
68
COPY entrypoint.sh /entrypoint.sh

install/build-docker-images.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ echo "${_group}Building and tagging Docker images ..."
33
echo ""
44
# Build any service that provides the image sentry-self-hosted-local first,
55
# as it is used as the base image for sentry-cleanup-self-hosted-local.
6-
$dc build --force-rm web
7-
$dc build --force-rm
6+
$dc build --build-arg http_proxy=$http_proxy --build-arg https_proxy=$https_proxy --build-arg no_proxy=$no_proxy --force-rm web
7+
$dc build --build-arg http_proxy=$http_proxy --build-arg https_proxy=$https_proxy --build-arg no_proxy=$no_proxy --force-rm
88
echo ""
99
echo "Docker images built."
1010

0 commit comments

Comments
 (0)