Skip to content

Commit 0f1c3c9

Browse files
committed
download Juniper.junos from cache instead of ansible-galaxy
part II - apply download in place Change-Id: I9f19815c83653c024ed24958184e1636f5acb6c6
1 parent 9d8122f commit 0f1c3c9

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

containers/controller/config/devicemgr/Dockerfile

+5-2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ ARG CONTRAIL_REGISTRY
22
ARG CONTRAIL_CONTAINER_TAG
33
FROM ${CONTRAIL_REGISTRY}/contrail-controller-config-base:${CONTRAIL_CONTAINER_TAG}
44

5+
ARG SITE_MIRROR
56
ARG CONTAINER_NAME
67
ENV SERVICE_NAME=device-manager \
78
CONTAINER_NAME=$CONTAINER_NAME
@@ -12,6 +13,7 @@ LABEL name=$CONTAINER_NAME \
1213
$VENDOR_DOMAIN".container.name"=$CONTAINER_NAME
1314

1415
# git rpm cannot be remove as it removes contrail-utils, and common by deps
16+
# use direct download to be able to download from cache instead of `ansible-galaxy install Juniper.junos,2.4.2`
1517
RUN pip install --no-compile \
1618
"markdown==3.1.1" \
1719
"markupSafe==1.1.1" \
@@ -32,9 +34,10 @@ RUN pip install --no-compile \
3234
"selectors2==2.0.1" \
3335
"timeout-decorator==0.4.1" && \
3436
yum install -y git iputils && \
35-
ansible-galaxy install Juniper.junos,2.4.2 && \
3637
yum clean all -y && \
37-
rm -rf /var/cache/yum
38+
rm -rf /var/cache/yum && \
39+
wget -nv --tries=3 -c -O Juniper.junos ${SITE_MIRROR:-"https://github.com"}/Juniper/ansible-junos-stdlib/archive/2.4.2.tar.gz && \
40+
ansible-galaxy install Juniper.junos
3841

3942
COPY *.sh /
4043

0 commit comments

Comments
 (0)