Commit 74e47587 authored by Raphael Defosseux's avatar Raphael Defosseux

proper syntax for passing proxy var

Signed-off-by: default avatarRaphael Defosseux <raphael.defosseux@eurecom.fr>
parent 6e7db844
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
# #
FROM centos:7.6.1810 AS oai-base FROM centos:7.6.1810 AS oai-base
ARG EURECOM_PROXY
RUN yum update -y && yum install -y \ RUN yum update -y && yum install -y \
vim-common \ vim-common \
git \ git \
...@@ -46,7 +47,7 @@ gcc-c++ ...@@ -46,7 +47,7 @@ gcc-c++
ENV USER=root ENV USER=root
# In Eurecom env we need a git proxy # In Eurecom env we need a git proxy
RUN if [[ -v EURECOM_PROXY ]]; then git config --global http.proxy http://proxy.eurecom.fr:8080; fi RUN /bin/bash -c "if [[ -v EURECOM_PROXY ]]; then git config --global http.proxy http://proxy.eurecom.fr:8080; fi"
RUN GIT_SSL_NO_VERIFY=true git clone https://gitlab.eurecom.fr/oai/openairinterface5g.git /openairinterface5g -b develop RUN GIT_SSL_NO_VERIFY=true git clone https://gitlab.eurecom.fr/oai/openairinterface5g.git /openairinterface5g -b develop
WORKDIR /openairinterface5g WORKDIR /openairinterface5g
......
...@@ -14,13 +14,14 @@ ...@@ -14,13 +14,14 @@
# limitations under the License. # limitations under the License.
FROM ubuntu:16.04 AS oai-base FROM ubuntu:16.04 AS oai-base
ARG EURECOM_PROXY
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
vim-common \ vim-common \
git \ git \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*
# In Eurecom env we need a git proxy # In Eurecom env we need a git proxy
RUN if [[ -v EURECOM_PROXY ]]; then git config --global http.proxy http://proxy.eurecom.fr:8080; fi RUN /bin/bash -c "if [[ -v EURECOM_PROXY ]]; then git config --global http.proxy http://proxy.eurecom.fr:8080; fi"
RUN git clone https://gitlab.eurecom.fr/oai/openairinterface5g/ /openairinterface5g -b develop RUN git clone https://gitlab.eurecom.fr/oai/openairinterface5g/ /openairinterface5g -b develop
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
# limitations under the License. # limitations under the License.
FROM ubuntu:18.04 AS oai-base FROM ubuntu:18.04 AS oai-base
ARG EURECOM_PROXY
ENV DEBIAN_FRONTEND=noninteractive ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=Europe ENV TZ=Europe
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
...@@ -23,7 +24,7 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \ ...@@ -23,7 +24,7 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*
# In Eurecom env we need a git proxy # In Eurecom env we need a git proxy
RUN if [[ -v EURECOM_PROXY ]]; then git config --global http.proxy http://proxy.eurecom.fr:8080; fi RUN /bin/bash -c "if [[ -v EURECOM_PROXY ]]; then git config --global http.proxy http://proxy.eurecom.fr:8080; fi"
RUN git clone https://gitlab.eurecom.fr/oai/openairinterface5g/ /openairinterface5g -b develop RUN git clone https://gitlab.eurecom.fr/oai/openairinterface5g/ /openairinterface5g -b develop
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment