chore(devcontainer): update Dockerfile and devcontainer configuration

- Changed base image to mcr.microsoft.com/devcontainers/base:debian
- Updated system dependencies in Dockerfile
- Modified devcontainer.json for improved configuration
- Added tasks.json for npm build and development scripts
This commit is contained in:
Daniel 2026-03-08 01:14:23 +00:00 committed by GitHub
parent c7a4ba194d
commit dfba735236
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 45 additions and 51 deletions

View file

@ -1,52 +1,26 @@
# ------------------------------------------------------------
# Base Image
# ------------------------------------------------------------
FROM debian:unstable-slim
ENV DEBIAN_FRONTEND=noninteractive
ENV LANG=C.UTF-8
ENV LC_ALL=C.UTF-8
FROM mcr.microsoft.com/devcontainers/base:debian
# ------------------------------------------------------------
# System Dependencies
# ------------------------------------------------------------
RUN apt-get update && apt-get upgrade -y && \
RUN apt update && apt upgrade -y && \
apt-get install -y --no-install-recommends \
curl \
ca-certificates \
git \
build-essential \
sudo \
git-lfs \
fish \
unzip \
xz-utils \
libatomic1 \
libc6 \
wget \
nodejs \
npm && \
rm -rf /var/lib/apt/lists/*
# ------------------------------------------------------------
# Create Non-Root User
# ------------------------------------------------------------
ARG USERNAME=devuser
ARG UID=1000
ARG GID=1000
RUN groupadd --gid ${GID} ${USERNAME} && \
useradd --uid ${UID} --gid ${GID} -m -s /usr/bin/fish ${USERNAME} && \
echo "${USERNAME} ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
USER ${USERNAME}
WORKDIR /home/${USERNAME}
npm \
curl
# ------------------------------------------------------------
# Install Bun (Non-Root)
# ------------------------------------------------------------
ENV BUN_INSTALL=/home/${USERNAME}/.bun
ENV PATH="${BUN_INSTALL}/bin:${PATH}"
ENV BUN_INSTALL="$HOME/.bun"
ENV PATH="$BUN_INSTALL/bin:$PATH"
RUN curl -fsSL https://bun.sh/install | bash
# ------------------------------------------------------------
@ -58,7 +32,7 @@ RUN curl -fsSL https://opencode.ai/install -o opencode-install && \
rm opencode-install
# Add OpenCode to PATH permanently
ENV PATH="/home/${USERNAME}/.opencode/bin:${PATH}"
ENV PATH="$HOME/.opencode/bin:$PATH"
# ------------------------------------------------------------
# Ensure fish is Default Shell

View file

@ -1,22 +1,19 @@
{
"name": "debian-npm-fish-devcontainer",
"build": {
"dockerfile": "Dockerfile"
},
"remoteUser": "devuser",
"features": {},
"customizations": {
"name": "Monochrome Dev Container",
"build": {
"context": "..",
"dockerfile": "./Dockerfile"
},
"postCreateCommand": "git config --global core.editor \"code --wait\"",
"postStartCommand": "npm install && bun install",
"customizations": {
"vscode": {
"extensions": ["dbaeumer.vscode-eslint", "esbenp.prettier-vscode"]
}
},
"postCreateCommand": "npm install",
"remoteEnv": {
"SHELL": "/usr/bin/fish"
}
"mounts": [
"source=${env:HOME}/.gitconfig,target=/home/vscode/.gitconfig,type=bind,consistency=cached",
"source=${env:HOME}/.gnupg,target=/home/vscode/.gnupg,type=bind",
"source=${env:HOME}/.ssh,target=/home/vscode/.ssh,type=bind"
]
}

23
.vscode/tasks.json vendored Normal file
View file

@ -0,0 +1,23 @@
{
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "build",
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": [],
"label": "npm: build",
"detail": "vite build"
},
{
"type": "npm",
"script": "dev",
"problemMatcher": [],
"label": "npm: dev",
"detail": "vite"
}
]
}