Initial commit
This commit is contained in:
12
.devcontainer/Dockerfile
Normal file
12
.devcontainer/Dockerfile
Normal file
@@ -0,0 +1,12 @@
|
||||
FROM debian:trixie-slim
|
||||
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
sudo curl git ca-certificates \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Create non-root user matching Coder's expectations
|
||||
RUN useradd -m -s /bin/bash coder \
|
||||
&& echo "coder ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
|
||||
|
||||
USER coder
|
||||
WORKDIR /home/coder
|
||||
29
.devcontainer/devcontainer.json
Normal file
29
.devcontainer/devcontainer.json
Normal file
@@ -0,0 +1,29 @@
|
||||
{
|
||||
"name": "quic-ecs-dt",
|
||||
"build": {
|
||||
"dockerfile": "Dockerfile"
|
||||
},
|
||||
"features": {
|
||||
"ghcr.io/devcontainers/features/rust:1": {
|
||||
"version": "latest",
|
||||
"profile": "minimal"
|
||||
},
|
||||
"ghcr.io/devcontainers/features/python:1": {
|
||||
"version": "os-provided"
|
||||
}
|
||||
},
|
||||
"containerEnv": {
|
||||
"RUST_LOG": "info",
|
||||
"RUST_BACKTRACE": "1",
|
||||
"VM_ENDPOINT": "http://your-server:8428",
|
||||
"CM5_HOST": "192.168.1.x"
|
||||
},
|
||||
"forwardPorts": [3000, 8428, 4848],
|
||||
"portsAttributes": {
|
||||
"3000": { "label": "Grafana" },
|
||||
"8428": { "label": "Victoria Metrics" },
|
||||
"4848": { "label": "Quarto preview" }
|
||||
},
|
||||
"remoteUser": "coder",
|
||||
"postCreateCommand": "bash .devcontainer/setup.sh"
|
||||
}
|
||||
37
.devcontainer/setup.sh
Normal file
37
.devcontainer/setup.sh
Normal file
@@ -0,0 +1,37 @@
|
||||
#!/bin/bash
|
||||
# .devcontainer/setup.sh
|
||||
set -euo pipefail
|
||||
|
||||
echo "=== Installing system deps ==="
|
||||
sudo apt-get update -qq
|
||||
sudo apt-get install -y --no-install-recommends \
|
||||
build-essential pkg-config libssl-dev \
|
||||
texlive-latex-base texlive-latex-extra \
|
||||
texlive-fonts-recommended texlive-bibtex-extra \
|
||||
lmodern biber gcc-aarch64-linux-gnu
|
||||
|
||||
echo "=== Configuring Rust Target ==="
|
||||
# Rust is already installed by the Devcontainer feature
|
||||
rustup target add aarch64-unknown-linux-gnu
|
||||
|
||||
echo "=== Installing Quarto ==="
|
||||
QUARTO_VER="1.8.0"
|
||||
if ! command -v quarto &>/dev/null; then
|
||||
curl -LO "https://github.com/quarto-dev/quarto-cli/releases/download/v${QUARTO_VER}/quarto-${QUARTO_VER}-linux-amd64.deb"
|
||||
sudo dpkg -i "quarto-${QUARTO_VER}-linux-amd64.deb"
|
||||
rm "quarto-${QUARTO_VER}-linux-amd64.deb"
|
||||
fi
|
||||
|
||||
echo "=== Installing Python deps ==="
|
||||
# Python is installed by the Devcontainer feature
|
||||
python3 -m venv "$HOME/.venv/quic_ecs"
|
||||
source "$HOME/.venv/quic_ecs/bin/activate"
|
||||
pip install --quiet -r requirements.txt
|
||||
|
||||
echo "=== First Cargo build ==="
|
||||
cargo build --release 2>&1 | tail -5
|
||||
|
||||
echo "=== Quarto check ==="
|
||||
quarto check
|
||||
|
||||
echo "=== Done — workspace ready ==="
|
||||
Reference in New Issue
Block a user