limited commented on a change in pull request #2149: TO and TODB in docker front-to-back URL: https://github.com/apache/incubator-trafficcontrol/pull/2149#discussion_r184978181
########## File path: infrastructure/cdn-in-a-box/traffic_ops/Dockerfile-go ########## @@ -0,0 +1,63 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +############################################################ +# Dockerfile to build Traffic Ops container images +############################################################ + +# build stage compiles traffic_ops_golang +FROM golang:1.10 AS trafficops-build + +# TODO: generate BUILD_VERSION file prior -- just copy the file here +COPY .git /go/src/github.com/apache/incubator-trafficcontrol/.git +COPY VERSION /go/src/github.com/apache/incubator-trafficcontrol/VERSION +COPY traffic_ops/traffic_ops_golang /go/src/github.com/apache/incubator-trafficcontrol/traffic_ops/traffic_ops_golang +COPY lib /go/src/github.com/apache/incubator-trafficcontrol/lib + +WORKDIR /go/src/github.com/apache/incubator-trafficcontrol/traffic_ops/traffic_ops_golang + +RUN go get -v +RUN go install -ldflags "-X main.version=traffic_ops-$(cat ../../VERSION)-$(git rev-list HEAD | wc -l|tr -d ' ').$(git rev-parse --short=8 HEAD).el7 -B 0x`git rev-parse HEAD`" + + +# trafficops-go is the runtime image +FROM postgres:9.6 AS trafficops-go + + +ENV DB_SERVER=db +ENV DB_PORT=5432 +ENV POSTGRES_PASSWORD=!!twelve Review comment: Is it possible to load the traffic_ops.env file here so we don't need to duplicate all these variables? ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
