From dfba735236300238ac6ddb46e6dbaec1c88ae54b Mon Sep 17 00:00:00 2001 From: Daniel <790119+DanTheMan827@users.noreply.github.com> Date: Sun, 8 Mar 2026 01:14:23 +0000 Subject: [PATCH] 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 --- .devcontainer/Dockerfile | 44 +++++++-------------------------- .devcontainer/devcontainer.json | 29 ++++++++++------------ .vscode/tasks.json | 23 +++++++++++++++++ 3 files changed, 45 insertions(+), 51 deletions(-) create mode 100644 .vscode/tasks.json diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 588d8ec..dd49f58 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -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 diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 3aee656..3b9eb12 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -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" + ] } diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..59ffa53 --- /dev/null +++ b/.vscode/tasks.json @@ -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" + } + ] +} \ No newline at end of file