Connecting Livebook to a node on a remote docker container

Ok found it, starting livebook without the ERL_AFLAGS and now it connects!

Here is my configuration for anyone looking for the same thing:

Release

Create rel/remote.vm.args.eex with:

-erl_epmd_port 9000

So that docker compose exec app bin/app remote works

Remote

services:
  app:
    ...
    environment:
      ELIXIR_ERL_OPTIONS: "-erl_epmd_port 9000"                                  
      RELEASE_DISTRIBUTION: name
      RELEASE_NODE: app@example.com    
      RELEASE_COOKIE: cookie
    port:
      - 4369:4369
      - 9000:9000

Local

docker run -p 8080:8080 -p 8081:8081 --pull always -e LIVEBOOK_NODE="livebook@127.0.0.1" -e LIVEBOOK_DISTRIBUTION=name -e LIVEBOOK_DEFAULT_RUNTIME="attached:app@example.com:cookie" ghcr.io/livebook-dev/livebook
2 Likes