feat: add live config profile refresh
- Standardize built-in tool users for shared writable profile mounts - Mount canonical non-Git profile sources across compatible instances - Report restart-required outcomes and guard active profile deletion - Surface restart feedback in config profile editing Quality gates: frontend build passed; backend py_compile and LSP passed. Skipped: backend pytest/Ruff unavailable; Docker/manual checks not approved.
This commit is contained in:
@@ -20,9 +20,10 @@ RUN apt-get update && apt-get install -y \
|
||||
sudo \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Create a non-root user and allow passwordless sudo so the startup
|
||||
# permission fixer can adjust ownership of bind-mounted directories.
|
||||
RUN useradd -m -s /bin/bash user \
|
||||
# Use the shared built-in UID/GID so writable Config Profile mounts can be
|
||||
# shared by compatible instances without ownership changes.
|
||||
RUN groupadd -g 1000 user \
|
||||
&& useradd -m -u 1000 -g 1000 -s /bin/bash user \
|
||||
&& echo "user ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/user \
|
||||
&& chmod 0440 /etc/sudoers.d/user
|
||||
WORKDIR /home/user
|
||||
|
||||
@@ -22,7 +22,11 @@ RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
|
||||
# Set up git
|
||||
RUN git config --global init.defaultBranch main
|
||||
|
||||
# Code-server runs as abc user by default
|
||||
# The LinuxServer entrypoint maps abc to this shared UID/GID before starting
|
||||
# code-server, so writable Config Profile mounts are compatible with other
|
||||
# built-in tool containers.
|
||||
ENV PUID=1000 \
|
||||
PGID=1000
|
||||
USER abc
|
||||
|
||||
EXPOSE 8443
|
||||
@@ -17,7 +17,10 @@ RUN apt-get update && apt-get install -y \
|
||||
# Set up git
|
||||
RUN git config --global init.defaultBranch main
|
||||
|
||||
# Switch back to jovyan user (default for scipy-notebook)
|
||||
USER ${NB_UID}
|
||||
# start-notebook.py maps jovyan to this shared UID/GID and drops privileges.
|
||||
# Keep the image root at entrypoint time so that mapping can occur.
|
||||
ENV NB_UID=1000 \
|
||||
NB_GID=1000
|
||||
USER root
|
||||
|
||||
EXPOSE 8888
|
||||
@@ -27,8 +27,9 @@ RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
|
||||
# Install OpenCode
|
||||
RUN npm install -g opencode
|
||||
|
||||
# Create non-root user
|
||||
RUN useradd -m -s /bin/bash user
|
||||
# Use the shared built-in UID/GID for writable Config Profile mounts.
|
||||
RUN groupadd -g 1000 user \
|
||||
&& useradd -m -u 1000 -g 1000 -s /bin/bash user
|
||||
WORKDIR /home/user
|
||||
|
||||
# Set up git
|
||||
|
||||
@@ -28,8 +28,9 @@ RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
|
||||
# Install Pi Coding Agent globally
|
||||
RUN npm install -g --ignore-scripts @earendil-works/pi-coding-agent
|
||||
|
||||
# Create non-root user
|
||||
RUN useradd -m -s /bin/bash user
|
||||
# Use the shared built-in UID/GID for writable Config Profile mounts.
|
||||
RUN groupadd -g 1000 user \
|
||||
&& useradd -m -u 1000 -g 1000 -s /bin/bash user
|
||||
WORKDIR /home/user
|
||||
|
||||
# Set up git
|
||||
@@ -37,15 +38,11 @@ RUN git config --global init.defaultBranch main \
|
||||
&& git config --global user.email "dev@headquarter.local" \
|
||||
&& git config --global user.name "Developer"
|
||||
|
||||
# Create default tmux config
|
||||
RUN printf '%s\n' 'set -g mouse on' 'set -g default-terminal "screen-256color"' > /home/user/.tmux.conf
|
||||
|
||||
# Create default ranger config
|
||||
RUN mkdir -p /home/user/.config/ranger \
|
||||
&& printf '%s\n' 'set preview_files true' 'set use_preview_script true' > /home/user/.config/ranger/rc.conf
|
||||
|
||||
# Set up Pi config directory
|
||||
RUN mkdir -p /home/user/.pi/agent
|
||||
# Create user-owned default configuration files.
|
||||
RUN printf '%s\n' 'set -g mouse on' 'set -g default-terminal "screen-256color"' > /home/user/.tmux.conf \
|
||||
&& mkdir -p /home/user/.config/ranger /home/user/.pi/agent \
|
||||
&& printf '%s\n' 'set preview_files true' 'set use_preview_script true' > /home/user/.config/ranger/rc.conf \
|
||||
&& chown -R user:user /home/user
|
||||
|
||||
USER user
|
||||
|
||||
|
||||
Reference in New Issue
Block a user