Add Dockerfile and devcontainer.json for development environment setup

This commit is contained in:
Timothy Hofland
2026-06-07 21:48:59 +02:00
parent 94694fad07
commit 6e8edc2ca0
2 changed files with 51 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
FROM debian:bookworm-slim
# Install core Linux development utilities
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
curl \
git \
ssh-client \
ca-certificates \
sudo \
gnupg \
procps \
unzip \
&& rm -rf /var/lib/apt/lists/*
# Create a non-root user 'vscode' with sudo privileges
ARG USERNAME=vscode
ARG USER_UID=1000
ARG USER_GID=$USER_UID
RUN groupadd --gid $USER_GID $USERNAME \
&& useradd --uid $USER_UID --gid $USER_GID -m $USERNAME \
&& echo $USERNAME ALL=\(ALL\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \
&& chmod 0440 /etc/sudoers.d/$USERNAME
# Set the default user to the non-root user
USER $USERNAME
ENV HOME=/home/vscode
+23
View File
@@ -0,0 +1,23 @@
{
"name": "Generic Linux Dev Environment",
"build": {
"dockerfile": "Dockerfile"
},
"remoteUser": "vscode",
"updateRemoteUserUID": true,
"workspaceMount": "source=pi-hole-dev-vol,target=/workspace,type=volume",
"workspaceFolder": "/workspace",
"customizations": {
"vscode": {
"extensions": [
"vscode.git-base",
"vscode.git",
"mhutchie.git-graph",
"eamodio.gitlens"
]
}
},
"overrideCommand": true
}