Skip to content

Commit 302b22b

Browse files
authored
Fix apt config generation when http_proxy is set (#2725) (#2734)
1 parent fbf1750 commit 302b22b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cron/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +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
4+
RUN if [ -n "${http_proxy}" ]; then echo "Acquire::http::proxy \"${http_proxy}\";" >> /etc/apt/apt.conf; fi
5+
RUN if [ -n "${https_proxy}" ]; then echo "Acquire::https::proxy \"${https_proxy}\";" >> /etc/apt/apt.conf; fi
66
RUN apt-get update && apt-get install -y --no-install-recommends cron && \
77
rm -r /var/lib/apt/lists/*
88
COPY entrypoint.sh /entrypoint.sh

0 commit comments

Comments
 (0)