Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 19 additions & 5 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,21 @@ ARG NEOVIM_VERSION="0.11.6"
ARG STARSHIP_VERSION="1.24.2"
ARG UV_VERSION="0.11.1"
ARG ZOXIDE_VERSION="0.9.9"
ARG MICROMAMBA_VERSION="2.8.1-0"
# ─────────────────────────────────────────────────────────────────────────────

# Resolve build architecture once; all subsequent RUN steps source /etc/arch_vars.
# ARCH_DEB : amd64 | arm64 (used by .deb packages and simple linux-* binaries)
# ARCH_TAR : x86_64 | aarch64 (used by *-unknown-linux-* tarballs)
# ARCH_NVIM: x86_64 | arm64 (lazygit + neovim use this mixed naming)
# ARCH_NVIM: x86_64 | arm64 (lazygit + neovim use this mixed naming)
# ARCH_MAMBA: linux-64 | linux-aarch64 (micromamba release naming)
ARG TARGETARCH
RUN case "${TARGETARCH:-amd64}" in \
arm64) ARCH_DEB=arm64; ARCH_TAR=aarch64; ARCH_NVIM=arm64 ;; \
*) ARCH_DEB=amd64; ARCH_TAR=x86_64; ARCH_NVIM=x86_64 ;; \
arm64) ARCH_DEB=arm64; ARCH_TAR=aarch64; ARCH_NVIM=arm64; ARCH_MAMBA=linux-aarch64 ;; \
*) ARCH_DEB=amd64; ARCH_TAR=x86_64; ARCH_NVIM=x86_64; ARCH_MAMBA=linux-64 ;; \
esac && \
printf 'ARCH_DEB=%s\nARCH_TAR=%s\nARCH_NVIM=%s\n' \
"$ARCH_DEB" "$ARCH_TAR" "$ARCH_NVIM" > /etc/arch_vars
printf 'ARCH_DEB=%s\nARCH_TAR=%s\nARCH_NVIM=%s\nARCH_MAMBA=%s\n' \
"$ARCH_DEB" "$ARCH_TAR" "$ARCH_NVIM" "$ARCH_MAMBA" > /etc/arch_vars

# Install all system dependencies first (including gnupg for eza/qsv repos)
RUN apt-get update && \
Expand Down Expand Up @@ -154,6 +156,13 @@ RUN apt-get update && \
libasound2 libx11-6 libxext6 && \
rm -rf /var/lib/apt/lists/*

# Install micromamba (static binary; conda-compatible environment manager)
RUN set -eux; . /etc/arch_vars; \
curl -fLo /usr/local/bin/micromamba \
"https://github.com/mamba-org/micromamba-releases/releases/download/${MICROMAMBA_VERSION}/micromamba-${ARCH_MAMBA}"; \
chmod +x /usr/local/bin/micromamba; \
micromamba --version

# Create non-root dev user
ARG USERNAME=dev
ARG UID=1000
Expand Down Expand Up @@ -197,6 +206,11 @@ ENV CLAUDE_CODE_USE_FOUNDRY=1 \
ANTHROPIC_DEFAULT_SONNET_MODEL=claude-sonnet-4-6 \
ANTHROPIC_DEFAULT_HAIKU_MODEL=claude-haiku-4-6

ENV MAMBA_ROOT_PREFIX="/home/${USERNAME}/micromamba"

# Wire micromamba shell hook into ~/.bashrc (appends eval block)
RUN micromamba shell init --shell bash --root-prefix ~/micromamba

# Install OpenCode CLI (unpinned: install script does not expose a version flag)
RUN curl -fsSL https://opencode.ai/install | bash

Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/post-create.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ npx --yes skills add cedanl/.github --skill '*' -a claude-code -a opencode -a pi

# Verify key CLIs are available (all installed via Dockerfile)
echo "✅ CLIs available:"
for cli in nvim opencode claude uv starship zoxide node npm csvlens; do
for cli in nvim opencode claude uv starship zoxide node npm csvlens micromamba; do
which "$cli" 2>/dev/null && echo " ✅ $cli: $(which $cli)" || echo " ⚠️ $cli: missing"
done

Expand Down
Loading