Thank you for reading this post, don't forget to subscribe!
При билде образа — Docker сообщает об ошибке:
1 2 3 4 5 6 7 8 9 |
$ docker build -t aemdispatcher . Sending build context to Docker daemon 2.048 kB Step 1 : FROM ubuntu:14.04 Pulling repository docker.io/library/ubuntu ca4d7b1b9a51: Error pulling image (14.04) from docker.io/library/ubuntu, Get https://registry-1.docker.io/v1/images/ca4d7b1b9a51f72ff4da652d96943f657b4898889924ac3dae5df958dba0dc4a/ancestry: dial tcp: lError pulling image (14.04) from docker.io/library/ubuntu, Get https://registry-1.docker.io/v1/images/ca4d7b1b9a51f72ff4da652d96943f657b4898889924ac3dae5df958dba0dc4a/ancestry: dial tcp: lookup registry-1.docker.io: no such host |
Можно решить следующим костылем.
Проверяем — резолвятся ли домен и субдомен:
1 2 3 4 |
$ dig docker.io +short 52.20.116.43 52.3.113.26 54.175.168.144 |
1 2 3 4 5 6 7 8 9 10 11 |
$ dig registry-1.docker.io +short elb-registry.us-east-1.aws.dckr.io. us-east-1-elbregis-10fucsvj1tcgy-133821800.us-east-1.elb.amazonaws.com. 54.172.47.135 52.3.85.179 52.6.50.66 107.23.217.18 52.3.0.129 54.164.17.206 54.164.207.251 52.1.56.33 |
Работают. Берем любой из выданных NS-ом IP — и прописываем его в свой hosts
:
1 2 |
$ sudo sh -c "echo '54.172.47.135 registry-1.docker.io' >> /private/etc/hosts" Password: |
Запускам билд заново:
1 2 3 4 5 6 7 |
$ docker build -t aemdispatcher . Sending build context to Docker daemon 2.048 kB Step 1 : FROM ubuntu:14.04 14.04: Pulling from library/ubuntu 0a85502c06c9: Pulling fs layer 0998bf8fb9e9: Pulling fs layer ... |
готово