mirror of
https://github.com/Horizontal42/netsleuth.git
synced 2026-11-10 23:52:04 +03:00
feat: add devcontainer configuration for consistent development environment
This commit is contained in:
parent
3a0f95c793
commit
666c813cd4
2 changed files with 63 additions and 0 deletions
27
.devcontainer/Dockerfile
Normal file
27
.devcontainer/Dockerfile
Normal file
|
|
@ -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"]
|
||||||
36
.devcontainer/devcontainer.json
Normal file
36
.devcontainer/devcontainer.json
Normal file
|
|
@ -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"
|
||||||
|
}
|
||||||
Loading…
Add table
Reference in a new issue