verzia 0.1 s image z nexus
This commit is contained in:
@@ -4,9 +4,7 @@ FROM python:${PYTHON_VERSION}-slim
|
|||||||
|
|
||||||
ENV PYTHONUNBUFFERED=1 \
|
ENV PYTHONUNBUFFERED=1 \
|
||||||
PIP_NO_CACHE_DIR=1 \
|
PIP_NO_CACHE_DIR=1 \
|
||||||
PIP_DISABLE_PIP_VERSION_CHECK=1 \
|
PIP_DISABLE_PIP_VERSION_CHECK=1
|
||||||
VIRTUAL_ENV=/workspace/.venv \
|
|
||||||
PATH="/workspace/.venv/bin:${PATH}"
|
|
||||||
|
|
||||||
# Základ + Docker repo + docker-ce-cli + compose plugin + git
|
# Základ + Docker repo + docker-ce-cli + compose plugin + git
|
||||||
RUN set -eux; \
|
RUN set -eux; \
|
||||||
|
|||||||
@@ -1,12 +1,13 @@
|
|||||||
{
|
{
|
||||||
"name": "Python Dev",
|
"name": "Python Dev",
|
||||||
"build": {
|
"image": "docker.masara.eu/python:3.13-0.1-devcontainer",
|
||||||
"dockerfile": "Dockerfile",
|
// "build": {
|
||||||
"context": ".",
|
// "dockerfile": "Dockerfile",
|
||||||
"args": {
|
// "context": ".",
|
||||||
"PYTHON_VERSION": "3.13"
|
// "args": {
|
||||||
}
|
// "PYTHON_VERSION": "3.13"
|
||||||
},
|
// }
|
||||||
|
// },
|
||||||
"containerEnv": {
|
"containerEnv": {
|
||||||
"PIP_INDEX_URL": "https://dv.masara.eu/repository/pypi-group/simple"
|
"PIP_INDEX_URL": "https://dv.masara.eu/repository/pypi-group/simple"
|
||||||
// alebo "/simple", ak to Nexus vyžaduje
|
// alebo "/simple", ak to Nexus vyžaduje
|
||||||
@@ -37,7 +38,13 @@
|
|||||||
],
|
],
|
||||||
"editor.formatOnSave": true,
|
"editor.formatOnSave": true,
|
||||||
"python.defaultInterpreterPath": "/workspace/.venv/bin/python",
|
"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": [
|
"forwardPorts": [
|
||||||
// 8000,
|
// 8000,
|
||||||
// 8080
|
// 8080
|
||||||
]
|
],
|
||||||
|
"portsAttributes": {
|
||||||
|
// "8000": {
|
||||||
|
// "label": "App",
|
||||||
|
// "onAutoForward": "openBrowser"
|
||||||
|
// },
|
||||||
|
// "8080": {
|
||||||
|
// "label": "Debug",
|
||||||
|
// "onAutoForward": "silent"
|
||||||
|
// },
|
||||||
|
"*": {
|
||||||
|
"onAutoForward": "ignore"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -27,3 +27,6 @@ if [ -f "/workspace/requirements.txt" ]; then
|
|||||||
else
|
else
|
||||||
echo "requirements.txt nenájdený – preskakujem inštaláciu závislostí."
|
echo "requirements.txt nenájdený – preskakujem inštaláciu závislostí."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo "Nastavujem Git credential helper..."
|
||||||
|
git config --global credential.helper manager-core
|
||||||
|
|||||||
@@ -11,10 +11,11 @@
|
|||||||
|
|
||||||
> Prvé otvorenie projektu môže trvať aj 10 min. Musí sa buildovať image.
|
> 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
|
* kontroluje, či je vytvorené venv, ak nie, vytvorí sa a aktualizuje pip
|
||||||
* aktualizujú sa závislosti
|
* aktualizujú sa závislosti
|
||||||
|
* nastaví sa git credential helper
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user