You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
update.
I added network_mode:bridge in step1, partial RUN command works fun now, such as nslookupwgetapt.
The curl command still failed, error : curl: (6) Could not resolve host: www.google.com
I did the following step to recurrent the error:
step1、vi
docker-compose.yaml
step2、run the container
docker-compose -f docker-compose.yaml up -d buildkitd
step3、entry the container
docker exec -it 3a76a7e82807 /bin/sh
step4、test the container network
/ # nslookup www.google.com Server: 127.0.0.11 Address: 127.0.0.11:53 Non-authoritative answer: Name: www.google.com Address: 172.217.163.36 Non-authoritative answer: Name: www.google.com Address: 2404:6800:4012:4::2004
the network is OK.
step5、create a Dockerfile, vi
Dockerfile
(still in the container)step6、build the Dockerfile (still in the container)
/ # buildctl --addr=tcp://0.0.0.0:1234 build --frontend=dockerfile.v0 --local context=. --local dockerfile=. --progress=plain
step7、 encounter the ERROR!
machine info:
Ubuntu 18.04.6
x86_64
cat /etc/resolv.conf
on the Ubuntu machine:the Ubuntu machine's network is perfectly fine.
cat /etc/resolv.conf
in the container:/ # cat /etc/resolv.conf nameserver 127.0.0.11 options ndots:0
other steps:
RUN nslookup www.google.com
tocurl -vvvv -s https://www.google.com
,it produce a similar error :so, why the build command failed?
Did i missed some config in the step 1?
The text was updated successfully, but these errors were encountered: