0

Hello i am following a tutorial on DOCKER. But it is on Linux Environement, actually i use DOCKER on WINDOWS.

The purpose is to create an image bind to unix socket with alpine image :

docker container run --rm -it -v /var/run/docker.sock:/var/run/docker.sock alpine

and run a call to Docker Daemon with CURL from the Alpine Shell :

curl -X POST –unix-socket /var/run/docker.sock -d '{"Image":"nginx:1.12.2"}' -H 'Content-Type: application/json' http://localhost/containers/create 

But i am on windows ... i tryed :

docker container run --rm -it -v //./pipe/docker_engine://./pipe/docker_engine alpine

But i can't connection :/

and i don't know how to modify the CURL request.

I already checked :

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.

Thank you for helping me :/

  • What do you expect `//.` to mean, both on the host and inside the container? – tripleee Feb 15 '22 at 10:47
  • @tripleee Host is my Windows Machine Physical. And the container will be an Alpline Container, ( i expect nothing :p i am completly beginner, i tryed many syntaxe found :/ ) – Baptiste Bauer Feb 15 '22 at 12:07
  • We can't tell you what to put there if we can't understand what you _want_ it to mean. – tripleee Feb 15 '22 at 12:14
  • @tipleee i just want to be able to use de DOcker API from my container and creer througth this an other container like this curl -X POST –unix-socket /var/run/docker.sock -d '{"Image":"nginx:1.12.2"}' -H 'Content-Type: application/json' http://localhost/containers/create – Baptiste Bauer Feb 15 '22 at 12:18
  • Well if `//./pipe/docker_engine` is correct on the host side (which I have no idea about; I luckily don't have any access to Windows) at a minimum that should be mapped to `/var/run/docker.sock` inside the container, so `-v //./pipe/docker_engine:/var/run/docker.sock`; but where is the socket _actually_ on your Windows host, if it is exposed at all? – tripleee Feb 15 '22 at 12:21

0 Answers0