Files
python313/.devcontainer/devcontainer.json
2025-12-07 16:40:34 +01:00

71 lines
2.1 KiB
JSON

{
"name": "Python Dev",
"image": "docker.masara.eu/python:3.13-0.1-devcontainer",
// "build": {
// "dockerfile": "Dockerfile",
// "context": ".",
// "args": {
// "PYTHON_VERSION": "3.13"
// }
// },
"containerEnv": {
"PIP_INDEX_URL": "https://dv.masara.eu/repository/pypi-group/simple",
"PIP_ROOT_USER_ACTION": "ignore"
},
"remoteEnv": {
"DOCKER_BUILDKIT": "1"
},
"workspaceFolder": "/workspace",
"workspaceMount": "source=${localWorkspaceFolder},target=/workspace,type=bind",
"remoteUser": "root",
"customizations": {
"vscode": {
"extensions": [
"ms-python.python",
"ms-python.vscode-pylance",
"ms-toolsai.jupyter",
"ms-python.black-formatter",
"ms-python.isort",
"ms-azuretools.vscode-docker"
],
"settings": {
"python.formatting.provider": "black",
"python.analysis.extraPaths": [
"${workspaceFolder}/.venv/lib/python3.13/site-packages",
"${workspaceFolder}/app"
],
"editor.formatOnSave": true,
// "python.defaultInterpreterPath": "/workspace/.venv/bin/python",
"python.terminal.activateEnvironment": true,
"python.defaultInterpreterPath": ".venv/bin/python",
// nechceme obnovovať staré porty z predchádzajúcich session
"remote.restoreForwardedPorts": false,
// auto-forward portov len na základe outputu, nie procesov
"remote.autoForwardPortsSource": "output",
// vypni auto-attach JS debug (často generuje ghost porty)
"debug.javascript.autoAttachFilter": "disabled"
}
}
},
"mounts": [
"type=bind,source=/var/run/docker.sock,target=/var/run/docker.sock"
],
"postCreateCommand": "bash .devcontainer/post_create.sh",
"forwardPorts": [
// 8000,
// 8080
],
"portsAttributes": {
// "8000": {
// "label": "App",
// "onAutoForward": "openBrowser"
// },
// "8080": {
// "label": "Debug",
// "onAutoForward": "silent"
// },
"*": {
"onAutoForward": "ignore"
}
}
}