Skip to content

Commit

Permalink
use yum-installed go
Browse files Browse the repository at this point in the history
  • Loading branch information
dangogh authored and dewrich committed Jul 3, 2018
1 parent 4dcedd7 commit a8c364c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
12 changes: 6 additions & 6 deletions infrastructure/cdn-in-a-box/traffic_ops/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 \
Expand Down
3 changes: 1 addition & 2 deletions infrastructure/cdn-in-a-box/traffic_ops/Dockerfile-go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a8c364c

Please sign in to comment.