// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.202.5/containers/docker-existing-dockerfile
{
    "name": "Goblint",

    "build": {
        "dockerfile": "./Dockerfile",
        "context": ".."
    },
    "remoteUser": "opam",

    "postCreateCommand": "if [ -e _opam ] && [ ! -L _opam ]; then echo 'ERROR: _opam already exists and is not a symlink. Delete it manually on the host and rebuild the container.' >&2; exit 1; elif [ ! -e _opam ]; then ln -s /home/opam/docker/analyzer/_opam .; fi",

    "runArgs": ["--init", "--env-file", ".devcontainer/devcontainer.env"], // TODO: why --init added by default?

    "extensions": [
		"ocamllabs.ocaml-platform",
		"hackwaly.ocamlearlybird"
	],

    "settings": {},
}
