Try Out Development Containers: OCaml
This is a sample project that lets you try out the VS Code Remote - Containers extension in a few easy steps.
CURRENT BUGS
- Launch.json and tasks.json are there but buggy, launching the program via F5 leads to an error as
eval $(opam env)
needs to be called for every new terminal- Therefore, manual compilation/running via a integrated terminal is needed for now
Setting up the development container
Follow these steps to open this sample in a container:
-
If this is your first time using a development container, please follow the getting started steps.
-
To use this repository, you can either open the repository in an isolated Docker volume:
- Clone this repository to your local filesystem.
- Press F1 and select the Remote-Containers: Open Folder in Container... command.
- Select the cloned copy of this folder, wait for the container to start, and try things out!
Things to try
Once you have this sample opened in a container, you'll be able to work with it like you would locally.
Note: This container runs as a non-root user with sudo access by default. Comment out
"remoteUser": "opam"
in.devcontainer/devcontainer.json
if you'd prefer to run as root.
Some things to try:
- Edit:
- Open
main.ml
- Try adding some code and check out the language features.
- Open
- Terminal: Press Ctrl+Shift+` and type
uname
and other Linux commands from the terminal window.- Source your ocaml installation via
eval $(opam env)
- Source your ocaml installation via
License
Licensed under the MIT License. See LICENSE in the project root for license information.