报错一

$ docker run hello-world
Unable to find image 'hello-world:latest' locally
Pulling repository docker.io/library/hello-world
K:\Docker Toolbox\docker.exe: Network timed out while trying to connect to https://index.docker.io/v1/repositories/library/hello-world/images. You may want to check your internet connection or if you are behind a proxy..
See 'K:\Docker Toolbox\docker.exe run --help'.

打开Docker Quickstart Terminal

#docker-machine ssh default

#sudo vi /var/lib/boot2docker/profile


export 'HTTPS_PROXY=http://PROXY:PORT'

docker@default:~$ sudo /etc/init.d/docker restart
    Need TLS certs for default,127.0.0.1,10.0.2.15,192.168.99.100 

docker@default:~$ exit

报错二

#docker build -t docker-whale .
unable to prepare context: unable to evaluate symlinks in Dockerfile path: GetFileAttributesEx C:\Users\Administrator\Desktop\testdocker\Dockerfile: The system cannot find the file specified.

解决方法

docker build -t docker-whale  -f /Dockerfiler .

如果当时建的文件是Dockerfile应该就不会出现这个问题了,如果不是就要自己指定一下文件名称

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-09
  • 2021-05-03
  • 2021-05-01
猜你喜欢
  • 2021-10-29
  • 2021-04-18
  • 2021-03-30
  • 2022-01-21
  • 2021-04-10
  • 2021-12-18
  • 2021-07-25
相关资源
相似解决方案