From 8f776333044f337bea8d9e3cafe0bdc28a883874 Mon Sep 17 00:00:00 2001 From: Zach Hoffman Date: Fri, 29 May 2020 12:40:28 -0600 Subject: [PATCH 1/2] Enroller uses the repo's version of the v2 TO client library --- .../cdn-in-a-box/enroller/Dockerfile | 10 ++----- .../enroller/Dockerfile.dockerignore | 30 +++++++++++++++++++ 2 files changed, 32 insertions(+), 8 deletions(-) create mode 100644 infrastructure/cdn-in-a-box/enroller/Dockerfile.dockerignore diff --git a/infrastructure/cdn-in-a-box/enroller/Dockerfile b/infrastructure/cdn-in-a-box/enroller/Dockerfile index 586a595788..91a7df4e22 100644 --- a/infrastructure/cdn-in-a-box/enroller/Dockerfile +++ b/infrastructure/cdn-in-a-box/enroller/Dockerfile @@ -17,18 +17,12 @@ FROM golang:1.14.2 AS enroller-builder -# enroller source and dependencies -COPY ./lib/ /go/src/github.com/apache/trafficcontrol/lib/ -COPY ./vendor/ /go/src/github.com/apache/trafficcontrol/vendor/ -COPY ./traffic_ops/client/ /go/src/github.com/apache/trafficcontrol/traffic_ops/v2-client/ -COPY ./traffic_ops/vendor/ /go/src/github.com/apache/trafficcontrol/traffic_ops/vendor/ -COPY ./infrastructure/cdn-in-a-box/ /go/src/github.com/apache/trafficcontrol/infrastructure/cdn-in-a-box/ +# enroller source and dependencies (see Dockerfile.dockerignore) +COPY . /go/src/github.com/apache/trafficcontrol/ WORKDIR /go/src/github.com/apache/trafficcontrol/infrastructure/cdn-in-a-box/enroller RUN go clean && go get -v && go build - - FROM debian:stretch RUN apt-get update && apt-get install -y netcat curl dnsutils net-tools && apt-get clean diff --git a/infrastructure/cdn-in-a-box/enroller/Dockerfile.dockerignore b/infrastructure/cdn-in-a-box/enroller/Dockerfile.dockerignore new file mode 100644 index 0000000000..77dc687fc9 --- /dev/null +++ b/infrastructure/cdn-in-a-box/enroller/Dockerfile.dockerignore @@ -0,0 +1,30 @@ +# 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. + +# To use this dockerignore: +# - Set these environment variables: COMPOSE_DOCKER_CLI_BUILD=1 DOCKER_BUILDKIT=1 +# - Use a docker version of 19.03.0 or higher (Docker Desktop >=2.1.0.1) +# For more information, see: +# - https://github.com/moby/buildkit/pull/901 +# - https://github.com/docker/compose/pull/6865 +# - https://docs.docker.com/develop/develop-images/build_enhancements/ +* +!lib/ +!vendor/ +!traffic_ops/v2-client/ +!traffic_ops/vendor/ +!infrastructure/cdn-in-a-box/ From f0e79845d10ee839f234719d52ee1da346f47542 Mon Sep 17 00:00:00 2001 From: Zach Hoffman Date: Wed, 3 Jun 2020 10:22:17 -0600 Subject: [PATCH 2/2] Do not use a dockerignore --- .../cdn-in-a-box/enroller/Dockerfile | 10 +++++-- .../enroller/Dockerfile.dockerignore | 30 ------------------- 2 files changed, 8 insertions(+), 32 deletions(-) delete mode 100644 infrastructure/cdn-in-a-box/enroller/Dockerfile.dockerignore diff --git a/infrastructure/cdn-in-a-box/enroller/Dockerfile b/infrastructure/cdn-in-a-box/enroller/Dockerfile index 91a7df4e22..f951f7bc13 100644 --- a/infrastructure/cdn-in-a-box/enroller/Dockerfile +++ b/infrastructure/cdn-in-a-box/enroller/Dockerfile @@ -17,12 +17,18 @@ FROM golang:1.14.2 AS enroller-builder -# enroller source and dependencies (see Dockerfile.dockerignore) -COPY . /go/src/github.com/apache/trafficcontrol/ +# enroller source and dependencies +COPY ./lib/ /go/src/github.com/apache/trafficcontrol/lib/ +COPY ./vendor/ /go/src/github.com/apache/trafficcontrol/vendor/ +COPY ./traffic_ops/v2-client/ /go/src/github.com/apache/trafficcontrol/traffic_ops/v2-client/ +COPY ./traffic_ops/vendor/ /go/src/github.com/apache/trafficcontrol/traffic_ops/vendor/ +COPY ./infrastructure/cdn-in-a-box/ /go/src/github.com/apache/trafficcontrol/infrastructure/cdn-in-a-box/ WORKDIR /go/src/github.com/apache/trafficcontrol/infrastructure/cdn-in-a-box/enroller RUN go clean && go get -v && go build + + FROM debian:stretch RUN apt-get update && apt-get install -y netcat curl dnsutils net-tools && apt-get clean diff --git a/infrastructure/cdn-in-a-box/enroller/Dockerfile.dockerignore b/infrastructure/cdn-in-a-box/enroller/Dockerfile.dockerignore deleted file mode 100644 index 77dc687fc9..0000000000 --- a/infrastructure/cdn-in-a-box/enroller/Dockerfile.dockerignore +++ /dev/null @@ -1,30 +0,0 @@ -# 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. - -# To use this dockerignore: -# - Set these environment variables: COMPOSE_DOCKER_CLI_BUILD=1 DOCKER_BUILDKIT=1 -# - Use a docker version of 19.03.0 or higher (Docker Desktop >=2.1.0.1) -# For more information, see: -# - https://github.com/moby/buildkit/pull/901 -# - https://github.com/docker/compose/pull/6865 -# - https://docs.docker.com/develop/develop-images/build_enhancements/ -* -!lib/ -!vendor/ -!traffic_ops/v2-client/ -!traffic_ops/vendor/ -!infrastructure/cdn-in-a-box/