Combine opencode-container and claude-container into a unified agent-container
Merge the two separate container projects into a single image and management script. Both OpenCode and Claude Code are installed in the same Arch Linux image and share one persistent $HOME directory, which enables the opencode-claude-bridge plugin to read Claude CLI credentials from within OpenCode. Subcommands: opencode, claude, update, force-cleanup.
This commit is contained in:
commit
61017da6ba
5 changed files with 539 additions and 0 deletions
40
Dockerfile
Normal file
40
Dockerfile
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
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 \
|
||||
curl \
|
||||
sudo && \
|
||||
groupadd -g ${GID} ${USERNAME} && \
|
||||
useradd -m -u ${UID} -g ${GID} -s /bin/bash ${USERNAME} && \
|
||||
echo "${USERNAME} ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers && \
|
||||
pacman -Scc --noconfirm
|
||||
|
||||
# Install OpenCode from AUR
|
||||
WORKDIR /tmp
|
||||
USER ${USERNAME}
|
||||
|
||||
RUN git clone https://aur.archlinux.org/opencode-bin.git && \
|
||||
cd opencode-bin && \
|
||||
makepkg --syncdeps --noconfirm --install && \
|
||||
sudo rm -rf /tmp/opencode-bin && \
|
||||
sudo pacman -Scc --noconfirm
|
||||
|
||||
# Install Claude Code using the native installer, then copy the binary
|
||||
# to a system-wide location so it survives the home directory bind mount
|
||||
RUN curl -fsSL https://claude.ai/install.sh | bash && \
|
||||
sudo cp ~/.local/bin/claude /usr/local/bin/claude && \
|
||||
rm -rf ~/.local/share/claude ~/.local/bin/claude ~/.claude ~/.claude.json \
|
||||
~/.cache/claude
|
||||
|
||||
WORKDIR /home/${USERNAME}
|
||||
Loading…
Add table
Add a link
Reference in a new issue