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