Docker pull images No such host error on mac osx - macos

I recently installed latest docker on my mac and i'm getting following error on pulling images.
First I install latest docker form mac binary and then i run
docker run -d -p 80:80 --name webserver nginx
And it return
ERROR: Service 'nginx' failed to build: Error while pulling image:
Gethttps://index.docker.io/v1/repositories/library/nginx/images: dial tcp:
lookup index.docker.io on ***.***.**.*:**: no such host
How can i fix this ?

After some days research I can't get the actual solution so i did one trick and worked for me. what i done is I open the docker preferences and there is a option reset to factory defaults and i reset my docker but it deletes all my containers and images after all it works. Thanks everyone.

Related

Is it possible to run sonatype/nexus3 docker container on MacOS?

I'm trying to start Maven repository as Docker container with this command:
docker run -d -p 8081:8081 --name nexus sonatype/nexus3
When I do it on my windows 10 host everything is fine.
When I try the same on my macOS host I get a lot of errors in logs, finnaly Nexus3 starts somehow, but when I try to open http://localhost:8081/ it stacks forever on initializing screen.
Is there any way to start Nexus on MacOS?
Ok. It looks line now (13.09.2021) the desidion is to use klo2k/nexus3 version of Nexus on ARM
I use also this image and it's work fine on my config (macOS Big Sur with Docker Desktop 3.6.0 on iMac Intel 64 Bits).
docker pull sonatype/nexus3
docker run -d -p 8081:8081 --name nexus sonatype/nexus3
Probably you have an issue in your Nexus config.

Can't connect from outside of container to Clickhouse by HTTP on Mac OS

I'm trying to use ClickHouse with docker on Mac OS. I use next command:
docker run -d -p 8123:8123 --rm --name some-clickhouse-server -v /my/config/path/config.xml:/etc/clickhouse-server/config.xml --ulimit nofile=262144:262144 yandex/clickhouse-server:latest
Container successfully started, but when I try to connect to it by http curl 'http://localhost:8123' I have an error:
Failed to connect to localhost port 8123: Connection refused
When I connect to Clickhouse from Clickhouse-client (also using docker image) everything is OK
I ran Clickhouse-server image in -it mode, installed curl, started server and tried to connect clickhouse-server from inside of container, it's OK too
Also I tried to modify config.xml (which was copied from docker image) settings for listen_host (::, 0.0.0.0, ::1, 127.0.0.1)
and for every setting I tried to connect by curl for localhost, 127.0.0.1, 0.0.0.0 - nothing of this solved my problem
Normally, docker desktop write these details of host and container to /etc/hosts, after adding the clickhouse-service as follows has resolved this issue.
127.0.0.1 localhost clickhouse-service
I used Docker Toolbox on Mac OS (in conjunction with VirtualBox). So, I've migrated to Docker Desktop and this has solved my problem

connected host has failed to respond when I run `docker run hello-world` in docker

The lastest version of docker(version 0.6) has been installed in my laptop (windows 10 LTSB) through the installation package docker toolbox. It seems to be installed correctly cause I see the logo of docker when I started the docker quickstart terminal. While when I run docker run hello-world, it returns
$ docker run hello-world
D:\Program Files\Docker Toolbox\docker.exe: An error occurred trying to connect: Post https://192.168.99.100:2376/v1.24/containers/create: dial tcp 192.168.99.100:2376: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond..
See 'D:\Program Files\Docker Toolbox\docker.exe run --help'.
By the way, I open the vpn through cisco anyconnect. However, when I disconnect the vpn and run the hello world, it seems to just froze at
$ docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
c04b14da8d14: Pulling fs layer
What happened? Can you find what's wrong with the docker or vpn?
You should first create a default machine (or start if already created):
docker-machine create default
Then get the environment commands for your new VM:
docker-machine env
And then connect your shell to the new machine:
eval "$(docker-machine env default)"
After then docker run hello-world is expected to work fine. I tested on Windows 10Pro with Docker-Toolbox

Docker can't pull image from repository

I have trouble with docker.
Im trying to create a new instance of rethinkdb on docker. I used the origin command from dockerfile github.
$ docker run -d -p 8080:8080 -p 28015:28015 -p 29015:29015 dockerfile/rethinkdb
But it returned error about image not found from the repository.
Any advice for this issue?
Thank everyone
OS version: Windows 10
Screenshot
That github repo doesn't appear to have been updated in a few years, and all the docker hub links are old. Consider using the official repo on docker hub:
docker run -d -p 8080:8080 -p 28015:28015 -p 29015:29015 rethinkdb

Can't pull docker image: no route to host

When using boot2docker on OSX, I can't pull a new image from Docker Hub:
$ docker run mysql
Unable to find image 'mysql' locally
Pulling repository mysql
2014/06/24 16:58:18 Get https://index.docker.io/v1/repositories/mysql/images: dial tcp: read udp 192.168.0.1:53: no route to host
I can still access that URL using a browser or curl. What gives?
Restarting boot2docker fixed it for me. I think it had to do with switching wifi networks using different IP ranges.
$ boot2docker restart

Resources