| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent ba42447 commit ebdcc3f
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,27 +1,9 @@ | |||
| 1 | - # syntax=docker/dockerfile:1 | ||
| 2 | - FROM debian:bookworm-slim | ||
| 1 | + ARG VARIANT="3.9" | ||
| 2 | + FROM mcr.microsoft.com/vscode/devcontainers/python:0-${VARIANT} | ||
| 3 | 3 | ||
| 4 | - RUN apt-get update && apt-get install -y \ | ||
| 5 | - libxkbcommon0 \ | ||
| 6 | - ca-certificates \ | ||
| 7 | - make \ | ||
| 8 | - curl \ | ||
| 9 | - git \ | ||
| 10 | - unzip \ | ||
| 11 | - libc++1 \ | ||
| 12 | - vim \ | ||
| 13 | - termcap \ | ||
| 14 | - && apt-get clean autoclean | ||
| 4 | + USER vscode | ||
| 15 | 5 | ||
| 16 | 6 | RUN curl -sSf https://rye-up.com/get | RYE_VERSION="0.15.2" RYE_INSTALL_OPTION="--yes" bash | |
| 17 | - ENV PATH=/root/.rye/shims:$PATH | ||
| 7 | + ENV PATH=/home/vscode/.rye/shims:$PATH | ||
| 18 | 8 | ||
| 19 | - WORKDIR /workspace | ||
| 20 | - | ||
| 21 | - COPY README.md .python-version pyproject.toml requirements.lock requirements-dev.lock /workspace/ | ||
| 22 | - | ||
| 23 | - RUN rye sync --all-features | ||
| 24 | - | ||
| 25 | - COPY . /workspace | ||
| 26 | - | ||
| 27 | - CMD ["rye", "shell"] | ||
| 9 | + RUN echo "[[ -d .venv ]] && source .venv/bin/activate" >> /home/vscode/.bashrc | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3,7 +3,26 @@ | |||
| 3 | 3 | { | |
| 4 | 4 | "name": "Debian", | |
| 5 | 5 | "build": { | |
| 6 | - "dockerfile": "Dockerfile" | ||
| 6 | + "dockerfile": "Dockerfile", | ||
| 7 | + "context": ".." | ||
| 8 | + }, | ||
| 9 | + | ||
| 10 | + "postStartCommand": "rye sync --all-features", | ||
| 11 | + | ||
| 12 | + "customizations": { | ||
| 13 | + "vscode": { | ||
| 14 | + "extensions": [ | ||
| 15 | + "ms-python.python" | ||
| 16 | + ], | ||
| 17 | + "settings": { | ||
| 18 | + "terminal.integrated.shell.linux": "/bin/bash", | ||
| 19 | + "python.pythonPath": ".venv/bin/python", | ||
| 20 | + "python.typeChecking": "basic", | ||
| 21 | + "terminal.integrated.env.linux": { | ||
| 22 | + "PATH": "/home/vscode/.rye/shims:${env:PATH}" | ||
| 23 | + } | ||
| 24 | + } | ||
| 25 | + } | ||
| 7 | 26 | } | |
| 8 | 27 | ||
| 9 | 28 | // Features to add to the dev container. More info: https://containers.dev/features. | |
| Back | FazBrowse Home | New Git URL |
0 commit comments