mounted home drive to not keep mounting drive

This commit is contained in:
Jun-te Kim 2025-03-21 20:18:55 +00:00
parent 7effe9f671
commit 0871c4fa07
2 changed files with 12 additions and 5 deletions

View file

@ -2,13 +2,17 @@ FROM library/python:3.12-bullseye
ARG USER=vscode
ARG DEBIAN_FRONTEND=noninteractive
RUN apt update \
&& apt install -y --no-install-recommends sudo \
# Install system dependencies in a single layer
RUN apt update && apt install -y --no-install-recommends \
sudo jq vim \
&& apt autoremove -y \
&& rm -rf /var/lib/apt/lists/* \
&& useradd -m -s /usr/bin/bash ${USER} \
&& rm -rf /var/lib/apt/lists/*
# Create the user and grant sudo privileges
RUN useradd -m -s /usr/bin/bash ${USER} \
&& echo "${USER} ALL=(ALL) NOPASSWD: ALL" >/etc/sudoers.d/${USER} \
&& chmod 0440 /etc/sudoers.d/${USER}
# Install Poetry
RUN pip install poetry
RUN pip install --no-cache-dir poetry

View file

@ -3,6 +3,9 @@
"build": { "dockerfile": "Dockerfile" },
"remoteUser": "vscode",
"postStartCommand": "bash .devcontainer/post-install.sh",
"mounts": [
"source=${localEnv:HOME},target=/workspaces/home,type=bind"
],
"customizations": {
"vscode": {
"extensions": [