Merge pull request #283 from DanTheMan827/update-devcontainer

chore(devcontainer): update Dockerfile and devcontainer configuration
This commit is contained in:
edideaur 2026-03-08 13:52:05 +02:00 committed by GitHub
commit 910b745c01
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 42 additions and 51 deletions

View file

@ -1,51 +1,25 @@
# ------------------------------------------------------------ # ------------------------------------------------------------
# Base Image # Base Image
# ------------------------------------------------------------ # ------------------------------------------------------------
FROM debian:unstable-slim FROM mcr.microsoft.com/devcontainers/base:debian
ENV DEBIAN_FRONTEND=noninteractive
ENV LANG=C.UTF-8
ENV LC_ALL=C.UTF-8
# ------------------------------------------------------------ # ------------------------------------------------------------
# System Dependencies # System Dependencies
# ------------------------------------------------------------ # ------------------------------------------------------------
RUN apt-get update && apt-get upgrade -y && \ RUN apt update && apt upgrade -y && \
apt-get install -y --no-install-recommends \ apt-get install -y --no-install-recommends \
curl \
ca-certificates \
git \ git \
build-essential \ git-lfs \
sudo \
fish \ fish \
unzip \
xz-utils \
libatomic1 \
libc6 \
wget \
nodejs \ nodejs \
npm && \ npm \
rm -rf /var/lib/apt/lists/* curl
# ------------------------------------------------------------
# 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}
# ------------------------------------------------------------ # ------------------------------------------------------------
# Install Bun (Non-Root) # Install Bun (Non-Root)
# ------------------------------------------------------------ # ------------------------------------------------------------
ENV BUN_INSTALL=/home/${USERNAME}/.bun ENV BUN_INSTALL="$HOME/.bun"
ENV PATH="${BUN_INSTALL}/bin:${PATH}" ENV PATH="$BUN_INSTALL/bin:$PATH"
RUN curl -fsSL https://bun.sh/install | bash 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 rm opencode-install
# Add OpenCode to PATH permanently # Add OpenCode to PATH permanently
ENV PATH="/home/${USERNAME}/.opencode/bin:${PATH}" ENV PATH="$HOME/.opencode/bin:$PATH"
# ------------------------------------------------------------ # ------------------------------------------------------------
# Ensure fish is Default Shell # Ensure fish is Default Shell

View file

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

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