You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by de...@apache.org on 2018/07/03 15:19:53 UTC
[trafficcontrol] 01/06: provide a way to bypass carton
This is an automated email from the ASF dual-hosted git repository.
dewrich pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficcontrol.git
commit 1be6e7dbd6d40e55fd4a9435e5090264c569c67b
Author: Dan Kirkwood <da...@apache.org>
AuthorDate: Mon Jun 25 09:24:40 2018 -0600
provide a way to bypass carton
---
infrastructure/cdn-in-a-box/traffic_ops/Dockerfile | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/infrastructure/cdn-in-a-box/traffic_ops/Dockerfile b/infrastructure/cdn-in-a-box/traffic_ops/Dockerfile
index 50ad18d..797b4f6 100644
--- a/infrastructure/cdn-in-a-box/traffic_ops/Dockerfile
+++ b/infrastructure/cdn-in-a-box/traffic_ops/Dockerfile
@@ -46,7 +46,16 @@ RUN yum install -y /$(basename $TRAFFIC_OPS_RPM)
RUN rm /$(basename $TRAFFIC_OPS_RPM) && \
yum clean all
-RUN POSTGRES_HOME=/usr/pgsql-9.6 cd /opt/traffic_ops/app && carton && rm -rf $HOME/.cpan*
+# if local.tar.gz exists, untar to .../app/local to keep carton from reinstalling the Perl universe
+# NOTE: copying Dockerfile so the COPY succeeds whether or not local.tar.gz exists
+WORKDIR /opt/traffic_ops/app
+COPY Dockerfile local.tar.gz /tmp/
+
+# run carton whether or not local dir was installed
+RUN [ -f /tmp/local.tar.gz ] && \
+ tar xzvf /tmp/local.tar.gz || true && \
+ POSTGRES_HOME=/usr/pgsql-9.6 carton && \
+ rm -rf $HOME/.cpan* /tmp/Dockerfile /tmp/local.tar.gz
RUN /opt/traffic_ops/install/bin/install_go.sh && \
/opt/traffic_ops/install/bin/install_goose.sh
@@ -54,7 +63,8 @@ RUN /opt/traffic_ops/install/bin/install_go.sh && \
RUN export PERL5LIB=/opt/traffic_ops/app/local/lib/perl5/:/opt/traffic_ops/install/lib/ \
&& export TERM=xterm \
&& export USER=root \
- && /opt/traffic_ops/install/bin/download_web_deps -i
+ && /opt/traffic_ops/install/bin/download_web_deps -i || \
+ true # keep a failure here from failing all..
# \todo add Drive Letters to postinstall input
# RUN sed -i -- 's/"value": "b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y"/"value": "0"/g' /opt/traffic_ops/install/data/profiles/profile.trafficserver_edge.traffic_ops