Open
Description
while building the image, ran into
#8 38.61 + curl -k -sS -L https://ngx-ctlr-master.localhost/install/controller-agent
#8 38.67 curl: (6) Could not resolve host: ngx-ctlr-master.localhost
the ngx-ctlr-master.localhost
is the nginx controller name, I don't have any DNS setup for the build host machine to resolve nginx controller host: ngx-ctlr-master.localhost
, tried to add ngx-ctlr-master.localhost
in build host machine /etc/hosts
, does not work. then i added docker argument --add-host "ngx-ctlr-master.localhost:10.154.120.180"
, this worked
/usr/src/docker-nginx-controller/ubuntu/no-nap# DOCKER_BUILDKIT=1 docker build --build-arg CONTROLLER_URL=https://ngx-ctlr-master.localhost/install/controller-agent --build-arg API_KEY='495ad61b1beb6c0cfbd4e0eafd22ac9b' --add-host "ngx-ctlr-master.localhost:10.154.120.180" --secret id=nginx-crt,src=nginx-repo.crt --secret id=nginx-key,src=nginx-repo.key -t nginx-agent .
[+] Building 61.8s (10/10) FINISHED
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 32B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load metadata for docker.io/library/ubuntu:18.04 1.1s
=> [1/5] FROM docker.io/library/ubuntu:18.04@sha256:0fedbd5bd9fb72089c7bbca476949e10593cebed9b1fb9edf5b79dbbac 0.0s
=> [internal] load build context 0.0s
=> => transferring context: 74B 0.0s
=> CACHED [2/5] COPY nginx-plus-api.conf /etc/nginx/conf.d/ 0.0s
=> CACHED [3/5] COPY entrypoint.sh / 0.0s
=> [4/5] RUN --mount=type=secret,id=nginx-crt,dst=/etc/ssl/nginx/nginx-repo.crt,mode=0644 --mount=type=secr 57.5s
=> [5/5] RUN ln -sf /proc/1/fd/1 /var/log/nginx-controller/agent.log && ln -sf /proc/1/fd/2 /var/log/nginx/e 1.3s
=> exporting to image 1.8s
=> => exporting layers 1.8s
=> => writing image sha256:49c21afb52599e9796b63690f572f8461f5d3c9610d966f349cd783d5793c050 0.0s
=> => naming to docker.io/library/nginx-agent
moby/moby#34078 says the host:ip mapping will not persist in the image /etc/hosts
file, wonder if this could be a problem
Metadata
Metadata
Assignees
Labels
No labels