Scripts to run Claude Code inside an Arch Linux Docker container that mirrors the local development environment while limiting access to sensitive host files. Includes per-project container isolation, a shared persistent home directory, and a shell alias for launching Claude interactively from any project directory.
25 lines
551 B
Docker
25 lines
551 B
Docker
FROM archlinux:latest
|
|
|
|
ARG USERNAME=dev
|
|
ARG UID=1000
|
|
ARG GID=1000
|
|
|
|
RUN pacman -Syu --noconfirm \
|
|
base-devel \
|
|
git \
|
|
ca-certificates \
|
|
bash \
|
|
less \
|
|
ripgrep \
|
|
nodejs \
|
|
npm \
|
|
sudo && \
|
|
groupadd -g ${GID} ${USERNAME} && \
|
|
useradd -m -u ${UID} -g ${GID} -s /bin/bash ${USERNAME} && \
|
|
echo "${USERNAME} ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers && \
|
|
npm install -g @anthropic-ai/claude-code && \
|
|
pacman -Scc --noconfirm
|
|
|
|
USER ${USERNAME}
|
|
|
|
WORKDIR /home/${USERNAME}
|