Pluto inside Docker container

I’m running julia inside docker container,
i’m unable to expose Pluto listening port 1234 to my host because Pluto binds to 127.0.0.1:1234
I need it to bind to 0:0.0.0:1234

Any advice?

Found solution myself:
Pluto.run(“0.0.0.0”, 1234)
binds pluto to 0.0.0.0 and allows docket to expose the port

3 Likes

Alternatively, you could use the official Pluto docker container:

https://hub.docker.com/r/plutojl/pluto

3 Likes

FWIW in recent version of Pluto it appears the new invocation is

import Pluto; Pluto.run(;host="0.0.0.0")
1 Like

Is this working at the moment? I have tried both images from plutojl/pluto, as well as building my own using Dockerfile from PlutoUtil, but with no luck. Pluto runs fine, but I am not able to connect. (Serving a simple web server from HTTP.jl within docker works)

I am using nerdctl from rancher desktop, if that matters.

nerdctl run --rm -it -p 1234:1234 plutojl/pluto

accessing http://localhost:1234/ gives ERR_EMPTY_RESPONSE

I have no idea why, but there is something about my 1234 port. If I connect to another port,

nerdctl run --rm -it -p 1235:1234 plutojl/pluto

everything works OK.