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:58 UTC

[trafficcontrol] 06/06: use yum-installed go

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 a8c364c6d8acfe256cf8442f858a2ee4a3aa1fdf
Author: Dan Kirkwood <da...@apache.org>
AuthorDate: Thu Jun 28 13:54:46 2018 -0600

    use yum-installed go
---
 infrastructure/cdn-in-a-box/traffic_ops/Dockerfile    | 12 ++++++------
 infrastructure/cdn-in-a-box/traffic_ops/Dockerfile-go |  3 +--
 2 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/infrastructure/cdn-in-a-box/traffic_ops/Dockerfile b/infrastructure/cdn-in-a-box/traffic_ops/Dockerfile
index 797b4f6..38f0990 100644
--- a/infrastructure/cdn-in-a-box/traffic_ops/Dockerfile
+++ b/infrastructure/cdn-in-a-box/traffic_ops/Dockerfile
@@ -40,10 +40,11 @@ RUN yum install -y perl-DBIx-Connector
 # Override TRAFFIC_OPS_RPM arg to use a different one using --build-arg TRAFFIC_OPS_RPM=...  Can be local file or http://...
 ARG TRAFFIC_OPS_RPM=traffic_ops.rpm
 ADD $TRAFFIC_OPS_RPM /
-RUN yum install -y /$(basename $TRAFFIC_OPS_RPM)
-
-# once installed, remove rpm to lower image size
-RUN rm /$(basename $TRAFFIC_OPS_RPM) && \
+RUN yum install -y \
+        /$(basename $TRAFFIC_OPS_RPM) \
+        git \
+        golang && \
+    rm /$(basename $TRAFFIC_OPS_RPM) && \
     yum clean all
 
 # if local.tar.gz exists, untar to .../app/local to keep carton from reinstalling the Perl universe
@@ -57,8 +58,7 @@ RUN [ -f /tmp/local.tar.gz ] && \
      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
+RUN /opt/traffic_ops/install/bin/install_goose.sh
 
 RUN export PERL5LIB=/opt/traffic_ops/app/local/lib/perl5/:/opt/traffic_ops/install/lib/ \
 	&& export TERM=xterm \
diff --git a/infrastructure/cdn-in-a-box/traffic_ops/Dockerfile-go b/infrastructure/cdn-in-a-box/traffic_ops/Dockerfile-go
index 96e73a5..2b838b9 100644
--- a/infrastructure/cdn-in-a-box/traffic_ops/Dockerfile-go
+++ b/infrastructure/cdn-in-a-box/traffic_ops/Dockerfile-go
@@ -24,9 +24,8 @@
 FROM centos:7
 RUN yum -y install nmap-ncat openssl
 
-RUN mkdir -p /opt/traffic_ops/app/bin /opt/traffic_ops/app/conf/production
+RUN mkdir -p /opt/traffic_ops/app/bin /opt/traffic_ops/app/conf/production /opt/traffic_ops/app/db
 COPY --from=trafficops-perl /opt/traffic_ops/app/bin/traffic_ops_golang /opt/traffic_ops/app/bin/traffic_ops_golang 
-COPY --from=trafficops-perl /usr/local/go /usr/local/go
 
 EXPOSE 6443
 WORKDIR /opt/traffic_ops/app