A template dev container for OCaml development, which is based on the latest stable versions of OCaml and Debian. The current configuration supports:
- Editing code using OCaml Platform VSCode extension
- Package management using opam
- Building projects using Dune
- Interactive REPL using utop
Dev Container is supported by Visual Studio Code and GitHub Codespaces. Follow the steps below to setup an environment where you can work on your OCaml projects.
- Install Docker Desktop
- Install Dev Containers extension
- Clone this repository.
- Execute command
Dev Containers: Open Folder in Container...
and open previously cloned repository. - VS Code will run a Dev Container. This step may take time during the first execution because the container has to be built from scratch.
Follow Codespace quickstart guide
Configuration is specified in files under .devcontainer
directory, which can be edited to tailor Dev Container to your needs.
Contains metadata and settings for Dev Container. Specification
Contains commands for building Dev Container docker image. Specification
This project can be used as a template for creating Dev Container for your own project. To do this, you need to copy .devcontainer
directory into your project's root. It's a way to provide a shared dev environment for all contributors.