VSCode Elm Devcontainer

I want to share something that has been possible for some time, but we never advertised or documented it. Running your vscode elm dev environment in a container.

Start vscode and install https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers

You don’t need to install any elm extensions in your vscode.

You should make sure you have docker on your system available and running.

Now open the source folder you want to work with in vscode, go to the command palette (F1) and enter Remote Containers: Open Folder in Container... and choose Elm from the next dialogue.

Initialization might take some time now, as it downloads the docker image and sets everything up. Elm, elm-test and elm-format are all included in the image and available.

You will find, that there are two new files that have been added to your project devcontainer.json and Dockerfile in the .devcontainer folder. Have a look, they should work for most cases, but can be changed if that’s needed.

Thanks to @andys8 for working on this https://github.com/microsoft/vscode-dev-containers/pull/224

6 Likes

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.