From 666c813cd403d1aff35b9771589ef9c55766327c Mon Sep 17 00:00:00 2001 From: "qwen.ai[bot]" Date: Wed, 12 Aug 2026 13:57:39 +0000 Subject: [PATCH] feat: add devcontainer configuration for consistent development environment --- .devcontainer/Dockerfile | 27 +++++++++++++++++++++++++ .devcontainer/devcontainer.json | 36 +++++++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+) create mode 100644 .devcontainer/Dockerfile create mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 0000000..7ef9aca --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,27 @@ +FROM mcr.microsoft.com/devcontainers/python:1-3.12 + +# Install system dependencies +RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ + && apt-get -y install --no-install-recommends \ + net-tools \ + iputils-ping \ + traceroute \ + dnsutils \ + curl \ + git \ + && apt-get clean -y && rm -rf /var/lib/apt/lists/* + +# Install uv for fast dependency management +RUN pip install --upgrade pip uv + +# Set working directory +WORKDIR /workspace + +# Copy project files +COPY . . + +# Install dependencies +RUN uv pip install -e .[dev] + +# Default command +CMD ["bash"] diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..2cf6f87 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,36 @@ +{ + "name": "Netsleuth Development", + "build": { + "dockerfile": "Dockerfile" + }, + "features": { + "ghcr.io/devcontainers/features/git:1": {}, + "ghcr.io/devcontainers/features/github-cli:1": {} + }, + "customizations": { + "vscode": { + "extensions": [ + "ms-python.python", + "ms-python.vscode-pylance", + "charliermarsh.ruff", + "ms-python.mypy-type-checker", + "tamasfe.even-better-toml", + "GitHub.copilot-chat" + ], + "settings": { + "python.defaultInterpreterPath": "/usr/local/bin/python", + "python.linting.enabled": true, + "python.linting.ruffEnabled": true, + "python.linting.mypyEnabled": true, + "python.formatting.provider": "black", + "editor.formatOnSave": true, + "editor.codeActionsOnSave": { + "source.organizeImports": "explicit" + } + } + } + }, + "forwardPorts": [8000], + "postCreateCommand": "uv pip install -e .[dev]", + "remoteUser": "root" +}