FROM archlinux:latest # ミラーリストを更新して高速化 RUN pacman -Sy --noconfirm reflector && \ reflector --country Japan --latest 5 --sort rate --save /etc/pacman.d/mirrorlist # システム更新と基本パッケージのインストール RUN pacman -Syu --noconfirm && \ pacman -S --noconfirm \ base-devel \ git \ vim \ neovim \ nodejs \ npm \ python \ python-pip \ go \ rust \ docker \ wget \ curl \ jq \ ripgrep \ fd \ bat \ exa \ zsh \ openssh \ sudo \ && pacman -Scc --noconfirm # 非rootユーザーを作成(wheel グループに追加) RUN useradd -m -G wheel -s /bin/zsh claude && \ echo 'claude ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers # AURヘルパー (yay) をインストール USER claude WORKDIR /home/claude RUN git clone https://aur.archlinux.org/yay.git && \ cd yay && \ makepkg -si --noconfirm && \ cd .. && \ rm -rf yay # 作業ディレクトリの設定 WORKDIR /workspace # 必要に応じてClaude Codeをインストール # RUN curl -fsSL https://... | sh # デフォルトシェルをzshに SHELL ["/bin/zsh", "-c"] # コンテナ起動時のコマンド CMD ["/bin/zsh"]