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" +}