From 302b22b7a51e54236aec8db7978c39b07d51c717 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pavel=20Mat=C4=9Bja?= Date: Wed, 31 Jan 2024 21:11:48 +0100 Subject: [PATCH] Fix apt config generation when http_proxy is set (#2725) (#2734) --- cron/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cron/Dockerfile b/cron/Dockerfile index edb6407fdb..c14304eb89 100644 --- a/cron/Dockerfile +++ b/cron/Dockerfile @@ -1,8 +1,8 @@ ARG BASE_IMAGE FROM ${BASE_IMAGE} USER 0 -RUN if [ -z "${http_proxy}" ]; then echo "Acquire::http::proxy \"${http_proxy}\";" >> /etc/apt/apt.conf; fi -RUN if [ -z "${https_proxy}" ]; then echo "Acquire::https::proxy \"${https_proxy}\";" >> /etc/apt/apt.conf; fi +RUN if [ -n "${http_proxy}" ]; then echo "Acquire::http::proxy \"${http_proxy}\";" >> /etc/apt/apt.conf; fi +RUN if [ -n "${https_proxy}" ]; then echo "Acquire::https::proxy \"${https_proxy}\";" >> /etc/apt/apt.conf; fi RUN apt-get update && apt-get install -y --no-install-recommends cron && \ rm -r /var/lib/apt/lists/* COPY entrypoint.sh /entrypoint.sh