Skip to content

Commit 83cac44

Browse files
author
Wang, Gang(Gary)
committed
MNEMONIC-267: Upgrade the Dockerfile to use ARG feature
1 parent fc7ecef commit 83cac44

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

docker/Dockerfile

+9-10
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,15 @@
1818
FROM centos:latest
1919
MAINTAINER Gang Wang (garyw@apache.org)
2020

21-
#set up your proxy below, refer to readme in the Docker folder
22-
ENV proxy_host ""
23-
ENV proxy_port ""
24-
#ENV http_proxy "http://${proxy_host}:${proxy_port}"
25-
#ENV https_proxy ${http_proxy}
26-
#ENV HTTP_PROXY ${http_proxy}
27-
#ENV HTTPS_PROXY ${http_proxy}
28-
#ENV proxy ${http_proxy}
29-
30-
RUN echo $proxy
21+
#set up your proxy below, please refer to readme in the Docker folder
22+
ARG proxy_host=""
23+
ARG proxy_port=""
24+
ENV http_proxy ${proxy_host:+"http://${proxy_host}:${proxy_port}"}
25+
ENV https_proxy ${http_proxy}
26+
ENV HTTP_PROXY ${http_proxy}
27+
ENV HTTPS_PROXY ${http_proxy}
28+
29+
RUN echo The proxy set : ${http_proxy}
3130

3231
RUN curl -sSL https://s3.amazonaws.com/download.fpcomplete.com/centos/7/fpco.repo | tee /etc/yum.repos.d/fpco.repo
3332

docker/README.md

136 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)