From dffd5a038ff61195700d3254b0cc92f6cd00b084 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=EB=B0=95=EC=84=B8=ED=9D=AC/=EB=8F=99=EC=9E=91=EC=A0=9C?= =?utf8?q?=EC=96=B4Lab=28SR=29/Principal=20Engineer/=EC=82=BC=EC=84=B1?= =?utf8?q?=EC=A0=84=EC=9E=90?= Date: Fri, 17 Aug 2018 15:33:30 +0900 Subject: [PATCH] Fix docker argument checking (#1074) This will fix docker argument check and execution - 'echo' and 'sed' was executed regardless of variable settings Signed-off-by: SaeHie Park --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8ac0ade..fcb1be5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,9 +4,9 @@ ARG HTTP_PROXY ARG HTTPS_PROXY ARG UBUNTU_MIRROR -RUN [ -n ${HTTP_PROXY} ] && echo "Acquire::http::proxy \"${HTTP_PROXY}\";" >> /etc/apt/apt.conf -RUN [ -n ${HTTPS_PROXY} ] && echo "Acquire::https::proxy \"${HTTPS_PROXY}\";" >> /etc/apt/apt.conf -RUN [ -n ${UBUNTU_MIRROR} ] && sed "s/archive.ubuntu.com/${UBUNTU_MIRROR}/g" -i /etc/apt/sources.list +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 if [ -n "$UBUNTU_MIRROR" ] ; then sed "s/archive.ubuntu.com/${UBUNTU_MIRROR}/g" -i /etc/apt/sources.list ; fi RUN apt update -- 2.7.4