Demo: a real task for OpenCode in Docker with the free model

Introduction

This article is part of a larger manual, OpenCode in Docker on Ubuntu 24.04.

The manual shows how to run OpenCode with the --auto option inside a Docker container.

With --auto the agent does not ask you before each command, so the container limits what it can reach: the agent works only in one git worktree, a separate copy of the project.

This article shows one real task from start to end: the command, what the agent did, its report and the change in the worktree. The task runs on the free model.

The run

The task: add Alpine Linux to the list of distributions of the Linux section.

The worktree is the one from step 2 (a worktree for the agent), the model is the free OpenCode model from step 4 (the config and the container notes):

container/tools/ai/opencode-docker.sh ../site-agent run "Add Alpine Linux (/linux/alpine/) to the list of distributions in the Linux section, next to Debian, Ubuntu, CentOS and Rocky. Then check the change the way the skills say."

The run took 4 minutes 13 seconds and asked nothing.

The agent loaded three skills, searched, edited one file and checked it with the tools (OpenCode output, tool calls only, shortened):

> build ยท deepseek-v4.1-flash-free $ ls /work/container/src/linux | head -50 $ grep -rn "Rocky" /work/container/src --include=*.php -l | head -20 โ†’ Read container/src/linux/index.php $ cat /work/container/src/linux/_linux_menu_inc.php โ† Edit container/src/linux/_linux_menu_inc.php $ php -l /work/container/src/linux/_linux_menu_inc.php; php -l /work/container/src/linux/index.php; php -v | head -2 No syntax errors detected in /work/container/src/linux/_linux_menu_inc.php No syntax errors detected in /work/container/src/linux/index.php $ cd /work/container/src && php -d error_reporting=E_ALL -r '$_SERVER["DOCUMENT_ROOT"]="/work/container/src"; require "/work/container/src/linux/index.php";' > /tmp/linux_index.html 2>/tmp/linux_index.err; echo "exit=$?" exit=0 $ cd /work && python3 container/tools/search/find_article.py --scan container/src/linux/_linux_menu_inc.php $ cd /work/container && ./tools/linters/check-line-endings.sh --files src/linux/_linux_menu_inc.php $ cd /work/container && ./tools/check-sitemap.sh OK: /work/container/tools/../src/sitemap.xml valid XML, single document, 4270 urls, no duplicates

The report

The end of its answer (shortened):

## Checks run (per the skills) - `php -l` on the include and on `linux/index.php`: clean. - CLI render of `/linux/` (DOCUMENT_ROOT shim): exit 0 [...] the rendered table now ends `Rocky โ†’ Alpine`. - Link target health: `/linux/alpine/index.php` renders exit 0 and declares `lang: 'en'`; no `.htaccess` rule redirects `/linux/alpine/`. - `check-sitemap.sh`: sitemap valid XML, single document, 4270 URLs, no duplicates. ## On the host git diff -- container/src/linux/_linux_menu_inc.php I can't commit from here (no git in the container).

The change on the host

On the host the worktree holds that one change:

git -C ../site-agent status --short

M container/src/linux/_linux_menu_inc.php

git -C ../site-agent diff

--- a/container/src/linux/_linux_menu_inc.php +++ b/container/src/linux/_linux_menu_inc.php @@ -24,6 +24,10 @@ echo' <a href="/linux/rocky/"> Rocky </a> +<tr><td><td> + <a href="/linux/alpine/"> + Alpine + </a> </tbody> </table>

The same in the TUI

For the interactive TUI leave out run and the task.

Its status line shows auto between the agent name and the model:

container/tools/ai/opencode-docker.sh ../site-agent

Article author: Klavdiya Kondakova