- "Check that the version of Elixir on the client matches the server" (Source)
- In livebook container, publish ports. For example:
8080:8080
8081:8081 - Add network of the elixir container to the livebook container. To list networks, run
docker network ls. - Bind your own folder to
/datafrom the Livebook container.
Summary as docker command:
docker run -p [PORT]:8080 -p [PORT]:8081 --pull always -u $(id -u):$(id -g) -v [LIVEBOOK_FOLDER_PATH]:/data --network [ELIXIR_CONTAINER_NETWORK] livebook/livebook:latest
For example:
docker run -p 8080:8080 -p 8081:8081 --pull always -u $(id -u):$(id -g) -v $(pwd):/data --network elixir_network_default livebook/livebook:latest
More info about the docker command here.
Warning for Windows:
-u $(id -u):$(id -g)must be removed to avoid right permission issues (Source)
Note for Windows:
C:directory is located at/mnt/c/
In the Elixir container (container already started):
iex --name [NODE_NAME]@[CONTAINER_NAME] --cookie [COOKIE] -S mix
For example:
iex --name mynode@elixir-app-1 --cookie mycookie -S mix
Go to Livebook > Runtime tab > Setting (cog icon) > Configure > Attach Mode > Fill the form fields:
Name:
[NODE_NAME]@[CONTAINER_NAME]
Cookie:
[COOKIE]
For example:
Name:
mynode@elixir-app-1
Cookie:
mycookie