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/06/14 18:05:28 UTC

[trafficcontrol] 16/20: move compose file up

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 2d1b8eba956fa5ca3ac5e8422646f9b6244a7763
Author: Dan Kirkwood <da...@apache.org>
AuthorDate: Wed Jun 13 09:16:11 2018 -0600

    move compose file up
---
 .../cdn-in-a-box/{traffic_ops => }/docker-compose.yml       |  6 +++---
 infrastructure/cdn-in-a-box/traffic_ops/Dockerfile          | 13 +++++++------
 infrastructure/cdn-in-a-box/{traffic_ops => }/variables.env |  0
 3 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/infrastructure/cdn-in-a-box/traffic_ops/docker-compose.yml b/infrastructure/cdn-in-a-box/docker-compose.yml
similarity index 96%
rename from infrastructure/cdn-in-a-box/traffic_ops/docker-compose.yml
rename to infrastructure/cdn-in-a-box/docker-compose.yml
index fe6b1ca..cbe5f92 100644
--- a/infrastructure/cdn-in-a-box/traffic_ops/docker-compose.yml
+++ b/infrastructure/cdn-in-a-box/docker-compose.yml
@@ -68,9 +68,9 @@ services:
     ports: 
       - "60443:60443"
     build:
-      context: .
+      context: traffic_ops
       args:
-        RPM: traffic_ops.rpm 
+        TRAFFIC_OPS_RPM: traffic_ops.rpm
     depends_on:
       - db
 
@@ -85,7 +85,7 @@ services:
     ports: 
       - "8443:443"
     build:
-      context: .
+      context: traffic_ops
       dockerfile: Dockerfile-go
     depends_on:
       - db
diff --git a/infrastructure/cdn-in-a-box/traffic_ops/Dockerfile b/infrastructure/cdn-in-a-box/traffic_ops/Dockerfile
index 437ec3c..dd4ea75 100644
--- a/infrastructure/cdn-in-a-box/traffic_ops/Dockerfile
+++ b/infrastructure/cdn-in-a-box/traffic_ops/Dockerfile
@@ -37,15 +37,16 @@ RUN yum install -y \
 RUN cpanm Carton
 RUN yum install -y perl-DBIx-Connector
 
-# Override RPM arg to use a different one using --build-arg RPM=...  Can be local file or http://...
-ARG RPM=traffic_ops.rpm
-ADD $RPM /
-RUN yum install -y /$(basename $RPM)
+# 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 $RPM)
+RUN rm /$(basename $TRAFFIC_OPS_RPM) && \
+    yum clean all
 
-RUN POSTGRES_HOME=/usr/pgsql-9.6 cd /opt/traffic_ops/app && carton
+RUN POSTGRES_HOME=/usr/pgsql-9.6 cd /opt/traffic_ops/app && carton && rm -rf $HOME/.cpan*
 
 RUN /opt/traffic_ops/install/bin/install_go.sh && \
     /opt/traffic_ops/install/bin/install_goose.sh
diff --git a/infrastructure/cdn-in-a-box/traffic_ops/variables.env b/infrastructure/cdn-in-a-box/variables.env
similarity index 100%
rename from infrastructure/cdn-in-a-box/traffic_ops/variables.env
rename to infrastructure/cdn-in-a-box/variables.env

-- 
To stop receiving notification emails like this one, please contact
dewrich@apache.org.