我使用的是Windows 10,之前安装了Docker Desktop。由于他们改变了商业使用条款,我决定卸载Docker Desktop,并仅使用docker引擎本身(因为我不使用GUI)。我已经在WSL 2下的Ubuntu上安装了docker
,它可以正常运行:
localusr@MACHINE:~$ docker context ls
NAME DESCRIPTION DOCKER ENDPOINT KUBERNETES ENDPOINT ORCHESTRATOR
default * Current DOCKER_HOST based configuration unix:///mnt/wsl/shared-docker/docker.sock swarm
desktop-linux npipe:////./pipe/dockerDesktopLinuxEngine
Warning: DOCKER_HOST environment variable overrides the active context. To use a context, either set the global --context flag, or unset DOCKER_HOST environment variable.
localusr@MACHINE:~$ docker run hello-world
Hello from Docker!
This message shows that your installation appears to be working correctly.
To generate this message, Docker took the following steps:
1. The Docker client contacted the Docker daemon.
2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
(amd64)
3. The Docker daemon created a new container from that image which runs the
executable that produces the output you are currently reading.
4. The Docker daemon streamed that output to the Docker client, which sent it
to your terminal.
To try something more ambitious, you can run an Ubuntu container with:
$ docker run -it ubuntu bash
Share images, automate workflows, and more with a free Docker ID:
https://hub.docker.com/
For more examples and ideas, visit:
https://docs.docker.com/get-started/
localusr@MACHINE:~$
现在我想允许我的JetBrains IDE连接到Docker引擎。我有以下选项:
那么配置连接的最佳方式是什么?是否可以通过某种方式“创建链接”以使用Docker for Windows
选项?似乎它只是尝试连接npipe:////./pipe/docker_engine
。或者我可以公开TCP/SSH端口。
我对配置Docker很新,请解释我可以使用哪个选项。