您好,我正在关注 DOCKER 的教程。但它在 Linux 环境下,实际上我在 WINDOWS 上使用 DOCKER。
目的是使用 alpine 图像创建一个绑定到 unix 套接字的图像:
docker container run --rm -it -v /var/run/docker.sock:/var/run/docker.sock alpine
并从 Alpine Shell 使用 CURL 运行对 Docker Daemon 的调用:
curl -X POST –unix-socket /var/run/docker.sock -d '{"Image":"nginx:1.12.2"}' -H 'Content-Type: application/json' http://localhost/containers/create
但我在窗户上......我试过了:
docker container run --rm -it -v //./pipe/docker_engine://./pipe/docker_engine alpine
但我无法连接:/
而且我不知道如何修改 CURL 请求。
我已经检查过:
Expose daemon on tcp://localhost:2375 without TLS
Exposing daemon on TCP without TLS helps legacy clients connect to the daemon. It also makes yourself vulnerable to remote code execution attacks. Use with caution.
感谢你们对我的帮助 :/