verzia 0.1 s image z nexus

This commit is contained in:
2025-12-07 11:49:24 +00:00
parent dbc1ceffef
commit 7d25c80996
4 changed files with 36 additions and 14 deletions

View File

@@ -4,9 +4,7 @@ FROM python:${PYTHON_VERSION}-slim
ENV PYTHONUNBUFFERED=1 \
PIP_NO_CACHE_DIR=1 \
PIP_DISABLE_PIP_VERSION_CHECK=1 \
VIRTUAL_ENV=/workspace/.venv \
PATH="/workspace/.venv/bin:${PATH}"
PIP_DISABLE_PIP_VERSION_CHECK=1
# Základ + Docker repo + docker-ce-cli + compose plugin + git
RUN set -eux; \

View File

@@ -1,12 +1,13 @@
{
"name": "Python Dev",
"build": {
"dockerfile": "Dockerfile",
"context": ".",
"args": {
"PYTHON_VERSION": "3.13"
}
},
"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"
// alebo "/simple", ak to Nexus vyžaduje
@@ -37,7 +38,13 @@
],
"editor.formatOnSave": true,
"python.defaultInterpreterPath": "/workspace/.venv/bin/python",
"remote.restoreForwardedPorts": false
"python.terminal.activateEnvironment": true,
// 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"
}
}
},
@@ -48,5 +55,18 @@
"forwardPorts": [
// 8000,
// 8080
]
],
"portsAttributes": {
// "8000": {
// "label": "App",
// "onAutoForward": "openBrowser"
// },
// "8080": {
// "label": "Debug",
// "onAutoForward": "silent"
// },
"*": {
"onAutoForward": "ignore"
}
}
}

View File

@@ -27,3 +27,6 @@ if [ -f "/workspace/requirements.txt" ]; then
else
echo "requirements.txt nenájdený preskakujem inštaláciu závislostí."
fi
echo "Nastavujem Git credential helper..."
git config --global credential.helper manager-core

View File

@@ -11,10 +11,11 @@
> Prvé otvorenie projektu môže trvať aj 10 min. Musí sa buildovať image.
## Otvorenie projektu
## Vytvorenie devcontainera
Pri otvorení projektu sa automaticky:
Pri vytvorení devkontajnera sa automaticky:
* kontroluje, či je vytvorené venv, ak nie, vytvorí sa a aktualizuje pip
* aktualizujú sa závislosti
* nastaví sa git credential helper