Compare commits

...

6 Commits

Author SHA1 Message Date
joakimp 18b4df23e5 Fix IPv6 connectivity failures: force IPv4 preference in CI builds
Publish Docker Image / build-base (push) Successful in 30m22s
Publish Docker Image / build-omos (push) Successful in 34m37s
Publish Docker Image / update-description (push) Failing after 15s
2026-04-12 17:39:25 +02:00
joakimp 60c83568cd Switch to directory mount for opencode config, update docs with make
Publish Docker Image / build-omos (push) Has been cancelled
Publish Docker Image / update-description (push) Has been cancelled
Publish Docker Image / build-base (push) Has been cancelled
Mount ~/.config/opencode as a directory instead of individual files.
This persists all config changes (opencode.json, oh-my-opencode-slim.json,
skills) across container restarts. Add make to README architecture diagram.
2026-04-12 17:33:45 +02:00
joakimp a8b5f23dba Add make to dev tools list in DOCKER_HUB.md
Publish Docker Image / build-omos (push) Failing after 10m37s
Publish Docker Image / update-description (push) Has been cancelled
Publish Docker Image / build-base (push) Has been cancelled
2026-04-12 17:05:35 +02:00
joakimp a6972becd1 Add make to base image
Publish Docker Image / build-base (push) Has been cancelled
Publish Docker Image / build-omos (push) Has been cancelled
Publish Docker Image / update-description (push) Has been cancelled
2026-04-12 17:04:50 +02:00
joakimp a183ad7ac6 Add neovim 0.12, bat, eza, zoxide, tmux, htop to base image
Publish Docker Image / update-description (push) Has been cancelled
Publish Docker Image / build-omos (push) Has been cancelled
Publish Docker Image / build-base (push) Has been cancelled
Replace vim-tiny with neovim from GitHub releases (pinned, multi-arch).
Add bat, eza, zoxide from GitHub releases and tmux, htop, patch from apt.
Move tmux from OMOS-only to base image. Set EDITOR=nvim.
Add neovim config mount option to docker-compose and docs.
2026-04-12 16:59:31 +02:00
joakimp 017f7f1343 Fix Docker Hub description update: use --rawfile and capture error response 2026-04-11 23:52:50 +02:00
5 changed files with 107 additions and 54 deletions
+18 -2
View File
@@ -14,11 +14,18 @@ jobs:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Force IPv4 for Docker Hub
run: |
# Prefer IPv4 to avoid intermittent IPv6 connectivity failures
echo 'precedence ::ffff:0:0/96 100' >> /etc/gai.conf
- name: Set up QEMU - name: Set up QEMU
uses: docker/setup-qemu-action@v4 uses: docker/setup-qemu-action@v4
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4 uses: docker/setup-buildx-action@v4
with:
driver-opts: network=host
- name: Login to Docker Hub - name: Login to Docker Hub
uses: docker/login-action@v4 uses: docker/login-action@v4
@@ -50,11 +57,18 @@ jobs:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Force IPv4 for Docker Hub
run: |
# Prefer IPv4 to avoid intermittent IPv6 connectivity failures
echo 'precedence ::ffff:0:0/96 100' >> /etc/gai.conf
- name: Set up QEMU - name: Set up QEMU
uses: docker/setup-qemu-action@v4 uses: docker/setup-qemu-action@v4
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4 uses: docker/setup-buildx-action@v4
with:
driver-opts: network=host
- name: Login to Docker Hub - name: Login to Docker Hub
uses: docker/login-action@v4 uses: docker/login-action@v4
@@ -100,16 +114,18 @@ jobs:
exit 1 exit 1
fi fi
HTTP_CODE=$(jq -n \ HTTP_CODE=$(jq -n \
--arg full "$(cat DOCKER_HUB.md)" \ --rawfile full DOCKER_HUB.md \
--arg short "Portable AI dev environment for opencode. Debian-based with git, Node.js, AWS CLI, and SSH support. Available in base and omos (multi-agent) variants." \ --arg short "Portable AI dev environment for opencode. Debian-based with git, Node.js, AWS CLI, and SSH support. Available in base and omos (multi-agent) variants." \
'{"full_description": $full, "description": $short}' | \ '{"full_description": $full, "description": $short}' | \
curl -s -o /dev/null -w "%{http_code}" -X PATCH \ curl -s -o /tmp/hub-response.txt -w "%{http_code}" -X PATCH \
"https://hub.docker.com/v2/repositories/${{ vars.DOCKERHUB_USERNAME }}/opencode-devbox/" \ "https://hub.docker.com/v2/repositories/${{ vars.DOCKERHUB_USERNAME }}/opencode-devbox/" \
-H "Authorization: JWT $TOKEN" \ -H "Authorization: JWT $TOKEN" \
-H "Content-Type: application/json" \ -H "Content-Type: application/json" \
-d @-) -d @-)
echo "Docker Hub API returned: $HTTP_CODE" echo "Docker Hub API returned: $HTTP_CODE"
if [ "$HTTP_CODE" != "200" ]; then if [ "$HTTP_CODE" != "200" ]; then
echo "Response body:"
cat /tmp/hub-response.txt
echo "::error::Docker Hub description update failed with HTTP $HTTP_CODE" echo "::error::Docker Hub description update failed with HTTP $HTTP_CODE"
exit 1 exit 1
fi fi
+24 -22
View File
@@ -9,7 +9,7 @@ Two image variants are published for each release:
| Tag | Description | | Tag | Description |
|---|---| |---|---|
| `latest` / `vX.Y.Z` | Base image — opencode, Node.js, AWS CLI, dev tools | | `latest` / `vX.Y.Z` | Base image — opencode, Node.js, AWS CLI, dev tools |
| `latest-omos` / `vX.Y.Z-omos` | Base + [oh-my-opencode-slim](https://github.com/alvinunreal/oh-my-opencode-slim) multi-agent orchestration, Bun, and tmux | | `latest-omos` / `vX.Y.Z-omos` | Base + [oh-my-opencode-slim](https://github.com/alvinunreal/oh-my-opencode-slim) multi-agent orchestration and Bun |
Both variants support `linux/amd64` and `linux/arm64`. Both variants support `linux/amd64` and `linux/arm64`.
@@ -184,28 +184,38 @@ Understanding what survives container restarts and what doesn't:
| `/home/developer/.ssh` | Host bind mount (ro) | ✅ Yes — lives on host | SSH keys | | `/home/developer/.ssh` | Host bind mount (ro) | ✅ Yes — lives on host | SSH keys |
| `/home/developer/.aws` | Host bind mount | ✅ Yes — lives on host | AWS credentials/SSO cache | | `/home/developer/.aws` | Host bind mount | ✅ Yes — lives on host | AWS credentials/SSO cache |
| `/home/developer/.local/share/opencode` | Named volume (if configured) | ✅ Yes — Docker volume | Session history, memory, auth tokens | | `/home/developer/.local/share/opencode` | Named volume (if configured) | ✅ Yes — Docker volume | Session history, memory, auth tokens |
| `/home/developer/.config/opencode/opencode.json` | Generated by entrypoint | ❌ No — regenerated each start | Provider config, MCP server definitions | | `/home/developer/.config/opencode` | Host bind mount (if configured) | ✅ Yes — lives on host | opencode.json, oh-my-opencode-slim.json, skills |
| `/home/developer/.config/opencode/oh-my-opencode-slim.json` | Generated by entrypoint (OMOS variant) | ❌ No — regenerated each start | Agent/model mappings |
### Key points ### Key points
- **Project files** (`/workspace`) are always safe — they're your host filesystem. - **Project files** (`/workspace`) are always safe — they're your host filesystem.
- **opencode config** is auto-generated from `OPENCODE_PROVIDER` env var on each start. It only sets provider and model — no MCP servers. To persist MCP server config, mount your own config file (see Custom opencode Config below). - **opencode config** is auto-generated from `OPENCODE_PROVIDER` env var on each start if no existing config is found. To persist config changes, mount the config directory from the host (see Custom opencode Config below).
- **opencode data** (session history, memory) is lost with `--rm` unless you add a named volume. - **opencode data** (session history, memory) is lost with `--rm` unless you add a named volume.
- **AWS SSO tokens** persist across restarts when `~/.aws` is mounted (recommended for Bedrock users). - **AWS SSO tokens** persist across restarts when `~/.aws` is mounted (recommended for Bedrock users).
## Custom opencode Config ## Custom opencode Config
For full control (MCP servers, custom models, keybindings), mount your own config: For full control over opencode settings (MCP servers, custom models, oh-my-opencode-slim agents, etc.), mount the entire config directory from the host:
```bash ```bash
docker run -it --rm \ docker run -it --rm \
-v ./my-opencode.json:/home/developer/.config/opencode/opencode.json:ro \ -v ~/.config/opencode:/home/developer/.config/opencode \
... \ ... \
joakimp/opencode-devbox:latest joakimp/opencode-devbox:latest
``` ```
When a config file is mounted, the `OPENCODE_PROVIDER` auto-config is skipped. This persists all configuration changes across container restarts. When an existing `opencode.json` is found, the `OPENCODE_PROVIDER` auto-config is skipped.
## Neovim Configuration
The image includes neovim 0.12 with `EDITOR=nvim` set by default. To use your own neovim config (and have plugins auto-install via lazy.nvim on first start), mount it from the host:
```bash
docker run -it --rm \
-v ~/.config/nvim:/home/developer/.config/nvim:ro \
... \
joakimp/opencode-devbox:latest
```
## Using docker-compose ## Using docker-compose
@@ -246,11 +256,12 @@ services:
- devbox-data:/home/developer/.local/share/opencode - devbox-data:/home/developer/.local/share/opencode
# Mount AWS config for Bedrock SSO (required for amazon-bedrock provider) # Mount AWS config for Bedrock SSO (required for amazon-bedrock provider)
# - ~/.aws:/home/developer/.aws # - ~/.aws:/home/developer/.aws
# Optional: mount your own opencode config (MCP servers, custom models, etc.) # Optional: mount opencode config directory (persists config changes across restarts)
# - ./opencode.json:/home/developer/.config/opencode/opencode.json:ro # - ~/.config/opencode:/home/developer/.config/opencode
# Optional: mount opencode skills from host # Optional: mount opencode agent skills from host
# - ~/.config/opencode/skills:/home/developer/.config/opencode/skills:ro
# - ~/.agents/skills:/home/developer/.agents/skills:ro # - ~/.agents/skills:/home/developer/.agents/skills:ro
# Optional: mount neovim config from host (plugins auto-install on first start)
# - ~/.config/nvim:/home/developer/.config/nvim:ro
volumes: volumes:
devbox-data: devbox-data:
@@ -287,7 +298,7 @@ docker compose run --rm devbox bash # interactive shell
- **opencode** — AI coding assistant - **opencode** — AI coding assistant
- **Node.js 22** — for npx-based MCP servers - **Node.js 22** — for npx-based MCP servers
- **AWS CLI v2** — SSO and Bedrock authentication - **AWS CLI v2** — SSO and Bedrock authentication
- **Dev tools** — git, git-lfs, ssh, ripgrep, fd, fzf, jq, curl, wget, vim, tree - **Dev tools** — git, git-lfs, ssh, ripgrep, fd, fzf, bat, eza, zoxide, jq, make, curl, wget, neovim 0.12, tmux, htop, tree
- **Non-root user** — runs as `developer` with UID auto-matched to workspace owner (sudo available) - **Non-root user** — runs as `developer` with UID auto-matched to workspace owner (sudo available)
### OMOS image (`latest-omos`) ### OMOS image (`latest-omos`)
@@ -296,7 +307,6 @@ Everything in the base image, plus:
- **[oh-my-opencode-slim](https://github.com/alvinunreal/oh-my-opencode-slim)** — multi-agent orchestration plugin - **[oh-my-opencode-slim](https://github.com/alvinunreal/oh-my-opencode-slim)** — multi-agent orchestration plugin
- **Bun** — JavaScript runtime required by oh-my-opencode-slim - **Bun** — JavaScript runtime required by oh-my-opencode-slim
- **tmux** — terminal multiplexer (used by OMOS for agent pane integration, but also useful on its own for managing multiple terminal sessions)
- **6 specialized agents** — Orchestrator, Explorer, Oracle, Librarian, Designer, Fixer - **6 specialized agents** — Orchestrator, Explorer, Oracle, Librarian, Designer, Fixer
### Additional runtimes (build from source) ### Additional runtimes (build from source)
@@ -335,15 +345,7 @@ On first start, the entrypoint configures oh-my-opencode-slim automatically. The
### Custom OMOS configuration ### Custom OMOS configuration
Mount your own config to control which models power each agent: If you mount the opencode config directory (see Custom opencode Config above), the `oh-my-opencode-slim.json` file is included and persists across restarts. Edit it directly to control which models power each agent, fallback chains, council setup, and more.
```bash
docker run -it --rm \
-e ENABLE_OMOS=true \
-v ./oh-my-opencode-slim.json:/home/developer/.config/opencode/oh-my-opencode-slim.json:ro \
... \
joakimp/opencode-devbox:latest-omos
```
See the [oh-my-opencode-slim configuration docs](https://github.com/alvinunreal/oh-my-opencode-slim/blob/master/docs/configuration.md) for the full reference. See the [oh-my-opencode-slim configuration docs](https://github.com/alvinunreal/oh-my-opencode-slim/blob/master/docs/configuration.md) for the full reference.
+34 -4
View File
@@ -27,7 +27,11 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
fd-find \ fd-find \
tree \ tree \
less \ less \
vim-tiny \ htop \
tmux \
make \
patch \
diffutils \
sudo \ sudo \
locales \ locales \
procps \ procps \
@@ -59,11 +63,39 @@ RUN ARCH=$(case "${TARGETARCH}" in amd64) echo "amd64" ;; arm64) echo "arm64" ;;
git lfs install --system && \ git lfs install --system && \
git-lfs --version git-lfs --version
# neovim — modern text editor (pre-built release from GitHub)
ARG NVIM_VERSION=0.12.1
RUN ARCH=$(case "${TARGETARCH}" in amd64) echo "x86_64" ;; arm64) echo "arm64" ;; *) echo "x86_64" ;; esac) && \
curl -fsSL "https://github.com/neovim/neovim/releases/download/v${NVIM_VERSION}/nvim-linux-${ARCH}.tar.gz" | tar -xz -C /opt && \
ln -s /opt/nvim-linux-${ARCH}/bin/nvim /usr/local/bin/nvim && \
nvim --version | head -1
# bat — syntax-highlighted cat replacement
ARG BAT_VERSION=0.25.0
RUN ARCH=$(case "${TARGETARCH}" in amd64) echo "x86_64" ;; arm64) echo "aarch64" ;; *) echo "x86_64" ;; esac) && \
curl -fsSL "https://github.com/sharkdp/bat/releases/download/v${BAT_VERSION}/bat-v${BAT_VERSION}-${ARCH}-unknown-linux-musl.tar.gz" | tar -xz -C /tmp && \
install /tmp/bat-v${BAT_VERSION}-${ARCH}-unknown-linux-musl/bat /usr/local/bin/bat && \
rm -rf /tmp/bat-v${BAT_VERSION}-* && \
bat --version
# eza — modern ls replacement
ARG EZA_VERSION=0.23.4
RUN ARCH=$(case "${TARGETARCH}" in amd64) echo "x86_64" ;; arm64) echo "aarch64" ;; *) echo "x86_64" ;; esac) && \
curl -fsSL "https://github.com/eza-community/eza/releases/download/v${EZA_VERSION}/eza_${ARCH}-unknown-linux-gnu.tar.gz" | tar -xz -C /usr/local/bin && \
eza --version | head -1
# zoxide — smarter cd command
ARG ZOXIDE_VERSION=0.9.9
RUN ARCH=$(case "${TARGETARCH}" in amd64) echo "x86_64" ;; arm64) echo "aarch64" ;; *) echo "x86_64" ;; esac) && \
curl -fsSL "https://github.com/ajeetdsouza/zoxide/releases/download/v${ZOXIDE_VERSION}/zoxide-${ZOXIDE_VERSION}-${ARCH}-unknown-linux-musl.tar.gz" | tar -xz -C /usr/local/bin zoxide && \
zoxide --version
# Set locale # Set locale
RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && locale-gen RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && locale-gen
ENV LANG=en_US.UTF-8 ENV LANG=en_US.UTF-8
ENV LANGUAGE=en_US:en ENV LANGUAGE=en_US:en
ENV LC_ALL=en_US.UTF-8 ENV LC_ALL=en_US.UTF-8
ENV EDITOR=nvim
# ── Node.js (required for opencode v1.x install + MCP servers) ────── # ── Node.js (required for opencode v1.x install + MCP servers) ──────
ARG NODE_VERSION=22 ARG NODE_VERSION=22
@@ -107,13 +139,11 @@ RUN if [ "${INSTALL_GO}" = "true" ]; then \
fi fi
# ── Optional: oh-my-opencode-slim (multi-agent orchestration) ──────── # ── Optional: oh-my-opencode-slim (multi-agent orchestration) ────────
# Installs Bun runtime, tmux, and the oh-my-opencode-slim npm package. # Installs Bun runtime and the oh-my-opencode-slim npm package.
# Runtime activation is controlled by ENABLE_OMOS env var in entrypoint. # Runtime activation is controlled by ENABLE_OMOS env var in entrypoint.
ARG INSTALL_OMOS=false ARG INSTALL_OMOS=false
ARG OMOS_VERSION=latest ARG OMOS_VERSION=latest
RUN if [ "${INSTALL_OMOS}" = "true" ]; then \ RUN if [ "${INSTALL_OMOS}" = "true" ]; then \
apt-get update && apt-get install -y --no-install-recommends tmux && \
rm -rf /var/lib/apt/lists/* && \
curl -fsSL https://bun.sh/install | BUN_INSTALL=/usr/local bash && \ curl -fsSL https://bun.sh/install | BUN_INSTALL=/usr/local bash && \
bun --version && \ bun --version && \
npm install -g oh-my-opencode-slim@${OMOS_VERSION}; \ npm install -g oh-my-opencode-slim@${OMOS_VERSION}; \
+24 -20
View File
@@ -110,23 +110,33 @@ docker compose exec -u developer devbox aws --version
### Custom opencode config ### Custom opencode config
Mount your own `opencode.json` for full control (MCP servers, custom models, etc.): For full control over opencode settings (MCP servers, custom models, oh-my-opencode-slim agents, etc.), mount the entire config directory from the host:
```yaml ```yaml
volumes: volumes:
- ./my-opencode.json:/home/developer/.config/opencode/opencode.json:ro - ~/.config/opencode:/home/developer/.config/opencode
``` ```
This persists all configuration changes across container restarts, including `opencode.json`, `oh-my-opencode-slim.json`, and skills. When an existing `opencode.json` is found, the `OPENCODE_PROVIDER` auto-config is skipped.
### Custom skills ### Custom skills
Mount your host's opencode skills into the container: Mount agent skills from the host:
```yaml ```yaml
volumes: volumes:
- ~/.config/opencode/skills:/home/developer/.config/opencode/skills:ro
- ~/.agents/skills:/home/developer/.agents/skills:ro - ~/.agents/skills:/home/developer/.agents/skills:ro
``` ```
### Neovim configuration
The image includes neovim 0.12 with `EDITOR=nvim` set by default. To use your own neovim config (and have plugins auto-install via lazy.nvim on first start), mount it from the host:
```yaml
volumes:
- ~/.config/nvim:/home/developer/.config/nvim:ro
```
### Rebuilding the Image ### Rebuilding the Image
`docker compose run` and `docker compose up` use the existing image — they **do not rebuild** when you change the Dockerfile or build args (e.g. updating `OPENCODE_VERSION`). Rebuild explicitly: `docker compose run` and `docker compose up` use the existing image — they **do not rebuild** when you change the Dockerfile or build args (e.g. updating `OPENCODE_VERSION`). Rebuild explicitly:
@@ -153,7 +163,7 @@ docker compose build --build-arg OPENCODE_VERSION=1.5.0
|---|---|---| |---|---|---|
| `INSTALL_PYTHON` | `false` | Python 3 + pip + venv | | `INSTALL_PYTHON` | `false` | Python 3 + pip + venv |
| `INSTALL_GO` | `false` | Go toolchain | | `INSTALL_GO` | `false` | Go toolchain |
| `INSTALL_OMOS` | `false` | [oh-my-opencode-slim](https://github.com/alvinunreal/oh-my-opencode-slim) multi-agent orchestration (installs Bun, tmux, and plugin) | | `INSTALL_OMOS` | `false` | [oh-my-opencode-slim](https://github.com/alvinunreal/oh-my-opencode-slim) multi-agent orchestration (installs Bun and plugin) |
| `OMOS_VERSION` | `latest` | Pin a specific oh-my-opencode-slim version | | `OMOS_VERSION` | `latest` | Pin a specific oh-my-opencode-slim version |
## oh-my-opencode-slim (Multi-Agent Orchestration) ## oh-my-opencode-slim (Multi-Agent Orchestration)
@@ -170,7 +180,7 @@ A pre-built OMOS image is available on Docker Hub as `joakimp/opencode-devbox:la
docker compose build --build-arg INSTALL_OMOS=true docker compose build --build-arg INSTALL_OMOS=true
``` ```
This installs Bun, tmux, and the oh-my-opencode-slim package into the image. This installs Bun and the oh-my-opencode-slim package into the image.
**2. Enable in `.env`:** **2. Enable in `.env`:**
@@ -191,20 +201,15 @@ On first start, the entrypoint runs the oh-my-opencode-slim installer in non-int
| Variable | Default | Description | | Variable | Default | Description |
|---|---|---| |---|---|---|
| `ENABLE_OMOS` | `false` | Activate oh-my-opencode-slim on container start | | `ENABLE_OMOS` | `false` | Activate oh-my-opencode-slim on container start |
| `OMOS_TMUX` | `false` | Enable tmux pane integration (tmux is included with `INSTALL_OMOS`) | | `OMOS_TMUX` | `false` | Enable tmux pane integration (tmux is included in the base image) |
| `OMOS_SKILLS` | `true` | Install recommended skills (simplify, agent-browser, cartography) | | `OMOS_SKILLS` | `true` | Install recommended skills (simplify, agent-browser, cartography) |
| `OMOS_RESET` | `false` | Force regenerate config on next start (backs up existing config) | | `OMOS_RESET` | `false` | Force regenerate config on next start (backs up existing config) |
### Custom Configuration ### Custom Configuration
You can mount your own oh-my-opencode-slim config instead of using the auto-generated one: If you mount the opencode config directory (see Custom opencode config above), the `oh-my-opencode-slim.json` file is included and persists across restarts. Edit it directly to control which models power each agent, fallback chains, council setup, and more.
```yaml See the [oh-my-opencode-slim configuration docs](https://github.com/alvinunreal/oh-my-opencode-slim/blob/master/docs/configuration.md) for the full reference.
volumes:
- ./oh-my-opencode-slim.json:/home/developer/.config/opencode/oh-my-opencode-slim.json:ro
```
The config file controls which models power each agent, fallback chains, council setup, and more. See the [oh-my-opencode-slim configuration docs](https://github.com/alvinunreal/oh-my-opencode-slim/blob/master/docs/configuration.md) for the full reference.
### Verifying Agents ### Verifying Agents
@@ -303,12 +308,12 @@ Host Machine
Container (Debian bookworm) Container (Debian bookworm)
├── opencode binary ├── opencode binary
├── oh-my-opencode-slim (optional — multi-agent orchestration plugin, includes Bun + tmux) ├── oh-my-opencode-slim (optional — multi-agent orchestration plugin, includes Bun)
├── AWS CLI v2 (SSO + Bedrock auth) ├── AWS CLI v2 (SSO + Bedrock auth)
├── git, ssh, ripgrep, fd, jq, curl, fzf ├── neovim 0.12, tmux, htop, bat, eza, zoxide, make
├── git, ssh, ripgrep, fd, fzf, jq, curl, tree
├── Node.js (for MCP servers) ├── Node.js (for MCP servers)
├── Bun (optional — included with oh-my-opencode-slim) ├── Bun (optional — included with oh-my-opencode-slim)
├── tmux (optional — included with oh-my-opencode-slim, also useful independently)
├── entrypoint.sh (UID adjustment, git config, provider setup) ├── entrypoint.sh (UID adjustment, git config, provider setup)
└── /workspace ← your code lives here └── /workspace ← your code lives here
``` ```
@@ -321,10 +326,9 @@ Container (Debian bookworm)
| `/home/developer/.ssh` | Host bind mount (ro) | ✅ Yes | SSH keys | | `/home/developer/.ssh` | Host bind mount (ro) | ✅ Yes | SSH keys |
| `/home/developer/.aws` | Host bind mount (if configured) | ✅ Yes | AWS credentials/SSO cache | | `/home/developer/.aws` | Host bind mount (if configured) | ✅ Yes | AWS credentials/SSO cache |
| `/home/developer/.local/share/opencode` | Named volume `devbox-data` | ✅ Yes | Session history, memory | | `/home/developer/.local/share/opencode` | Named volume `devbox-data` | ✅ Yes | Session history, memory |
| `/home/developer/.config/opencode/opencode.json` | Generated by entrypoint | ❌ No | Provider/model config | | `/home/developer/.config/opencode` | Host bind mount (if configured) | ✅ Yes | opencode.json, oh-my-opencode-slim.json, skills |
| `/home/developer/.config/opencode/oh-my-opencode-slim.json` | Generated by entrypoint (if OMOS enabled) | ❌ No | Agent/model mappings |
**opencode config** (`opencode.json`) is auto-generated from `OPENCODE_PROVIDER` on each start. It sets provider and model only — no MCP servers. To use MCP servers or custom settings, mount your own config file (see Custom opencode config above). **opencode config** (`opencode.json`) is auto-generated from `OPENCODE_PROVIDER` on each start. It sets provider and model only — no MCP servers. To persist config changes and use custom settings, mount the config directory from the host (see Custom opencode config above).
## License ## License
+7 -6
View File
@@ -31,15 +31,16 @@ services:
# SSH keys (read-only) — for git push/pull # SSH keys (read-only) — for git push/pull
- ${SSH_KEY_PATH:-~/.ssh}:/home/developer/.ssh:ro - ${SSH_KEY_PATH:-~/.ssh}:/home/developer/.ssh:ro
# Optional: mount your own opencode config (MCP servers, custom models, etc.) # Optional: mount opencode config directory (persists config changes across restarts)
# - ./opencode.json:/home/developer/.config/opencode/opencode.json:ro # Includes opencode.json, oh-my-opencode-slim.json, skills, etc.
# When mounted, OPENCODE_PROVIDER auto-config is skipped if opencode.json exists.
# - ~/.config/opencode:/home/developer/.config/opencode
# Optional: mount opencode skills from host # Optional: mount opencode agent skills from host
# - ~/.config/opencode/skills:/home/developer/.config/opencode/skills:ro
# - ~/.agents/skills:/home/developer/.agents/skills:ro # - ~/.agents/skills:/home/developer/.agents/skills:ro
# Optional: mount your own oh-my-opencode-slim config # Optional: mount neovim config from host (plugins auto-install on first start)
# - ./oh-my-opencode-slim.json:/home/developer/.config/opencode/oh-my-opencode-slim.json:ro # - ~/.config/nvim:/home/developer/.config/nvim:ro
# Optional: persist opencode data (auth, memory, etc.) # Optional: persist opencode data (auth, memory, etc.)
- devbox-data:/home/developer/.local/share/opencode - devbox-data:/home/developer/.local/share/opencode