From https://code.visualstudio.com/docs/remote/create-dev-container#_automate-dev-container-creation:
-
In a new VSCode project, enter
F1
and enter the command 'Remote-Containers: Add Development Container Configuration Files' and select the 'Elixir' docker. -
Enter
F1
again and enter the command, 'Remote-Containers:Open workspace in container'. Wait. Once complete, create a new VSCode terminal window. It should start in a container (and not on your host machine). -
Note you may edit the contents of
.devcontainer/
to get whatever env you'd like. Your.gitconfig
is added by default. Your~/.bash*
files are not. -
Rejoice and live better.
Elixir scripts use the .exs
file-extension. They can be run like elixir script.exs
.
From: https://elixirschool.com/en/lessons/basics/basics#trying-interactive-mode-2
In the container, type iex
to start an interactive Elixir REPL.
Use iex filename.exs
to load an Elixir file into the REPL.
Use mix project_name
to start a new compiled (.ex
) project.