56 lines
2.4 KiB
JSON
56 lines
2.4 KiB
JSON
// 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.155.1/containers/ubuntu
|
|
{
|
|
"name": "Checkmk",
|
|
"build": {
|
|
"dockerfile": "Dockerfile",
|
|
"args": { "VARIANT": "2.3.0p42" }
|
|
},
|
|
|
|
"customizations": {
|
|
"vscode": {
|
|
// Add the IDs of extensions you want installed when the container is created.
|
|
"extensions": [
|
|
"ms-python.python",
|
|
"ms-python.flake8",
|
|
"ms-python.isort",
|
|
"ms-python.pylint",
|
|
"ms-python.black-formatter",
|
|
"ms-python.vscode-pylance",
|
|
"littlefoxteam.vscode-python-test-adapter",
|
|
"rioj7.command-variable"
|
|
],
|
|
// Bash as default shell.
|
|
"settings": {"terminal.integrated.defaultProfile.linux": "bash"},
|
|
"python.defaultInterpreterPath": "/omd/sites/cmk/bin/python3"
|
|
}
|
|
},
|
|
|
|
// Mount complete volume for site directories
|
|
"mounts": [
|
|
{ "source": "omd-sites", "target": "/opt/omd/sites", "type": "volume" },
|
|
{ "source": "${localWorkspaceFolder}/lib", "target": "/opt/omd/sites/cmk/local/lib/python3/cmk", "type": "bind"},
|
|
{ "source": "${localWorkspaceFolder}/plugins", "target": "/opt/omd/sites/cmk/local/lib/python3/cmk_addons/plugins", "type": "bind" },
|
|
{ "source": "${localWorkspaceFolder}/plugins_legacy", "target": "/opt/omd/sites/cmk/local/share/check_mk", "type": "bind"},
|
|
{ "source": "${localWorkspaceFolder}/packages_local", "target": "/opt/omd/sites/cmk/var/check_mk/packages_local/", "type": "bind"}
|
|
],
|
|
|
|
// Use 'postCreateCommand' to run commands after the container is created.
|
|
"postCreateCommand": ".devcontainer/setpwd.sh",
|
|
|
|
// Start omd every time the container is started
|
|
"postStartCommand": ".devcontainer/startup.sh",
|
|
"postAttachCommand": "omd restart && cmk-update-license-usage",
|
|
|
|
// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
|
|
"remoteUser": "cmk",
|
|
|
|
"remoteEnv": {
|
|
"PATH": "/omd/sites/cmk/bin:/omd/sites/cmk/local/lib/python3/bin/:${containerEnv:PATH}",
|
|
"OMD_ROOT": "/omd/sites/cmk",
|
|
"OMD_SITE": "cmk",
|
|
"CMK_SITE_ID": "cmk",
|
|
"WORKSPACE": "${containerWorkspaceFolder}"
|
|
}
|
|
}
|