首页 > 解决方案 > 我如何告诉 Jhipster 我的 docker 守护进程在不同的 IP 地址上运行

问题描述

我在使用 docker 时遇到了问题,我必须创建一台现在为 .103 而不是 .100 的新机器(我无法在 .99.100 中创建它)

usuario@DESKTOP-GTCQCAR MINGW64 /c/Program Files/Docker Toolbox
$ docker-machine ls
NAME      ACTIVE   DRIVER       STATE     URL                         SWARM   DOCKER     ERRORS
default   *        virtualbox   Running   tcp://192.168.99.103:2376           v18.09.3

但是当我运行 D:...>gradlew -Pprod bootWar jibExportDockerContext && docker build -t myimage build/jib-docker-context

失败:拨打 gRPC 失败:无法连接到 Docker 守护进程。'docker daemon' 是否在此主机上运行?:拨打 tcp 192.168.99.100:2376

如何告诉 jhipster 我的新 docker 机器 Ip 在哪里?

BUILD SUCCESSFUL in 8m 42s
8 actionable tasks: 5 executed, 3 up-to-date
ERRO[0042] Can't add file \\?\D:\BasuraTemporal\Jhipster\jhipsterpress\build\jib-docker-context\classes\com\jhipsterpress\web\config\CloudDatabaseConfiguration.class to tar: io: read/write on closed pipe
ERRO[0042] Can't close tar writer: io: read/write on closed pipe
ERRO[0042] failed to dial gRPC: cannot connect to the Docker daemon. Is 'docker daemon' running on this host?: 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.
error during connect: Post https://192.168.99.100:2376/v1.37/build?buildargs=%7B%7D&cachefrom=%5B%5D&cgroupparent=&cpuperiod=0&cpuquota=0&cpusetcpus=&cpusetmems=&cpushares=0&dockerfile=Dockerfile&labels=%7B%7D&memory=0&memswap=0&networkmode=default&rm=1&session=8f16e07d58aa370f5278dd4fad3289675a2cee4ea80d24fcc607853ffc3f6043&shmsize=0&t=myimage&target=&ulimits=null: 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.
D:\BasuraTemporal\Jhipster\jhipsterpress>

谢谢

标签: dockerjhipster

解决方案


推荐阅读