feat: add podman
Some checks failed
perso/opencode/pipeline/head Something is wrong with the build of this commit

This commit is contained in:
Julien Cabillot
2026-03-31 08:53:26 -04:00
parent 9a9eced188
commit b592546777
2 changed files with 46 additions and 1 deletions

View File

@@ -66,6 +66,25 @@ export OPENCODE_API_URL=http://127.0.0.1:4096
opencode-attach
```
## Podman rootless (ready-to-use)
The image now includes Podman configured for rootless usage with the `opencode` user (`/etc/subuid`, `/etc/subgid`, `fuse-overlayfs`, `slirp4netns`).
When running this image, add runtime options required by Podman-in-container:
```bash
docker run -it -p 4096:4096 \
--security-opt seccomp=unconfined \
--device /dev/fuse \
jcabillot/opencode
```
Quick check inside the container:
```bash
podman info
```
## API
Once running, the server exposes an OpenAPI 3.1 spec at:
@@ -91,5 +110,6 @@ See the [OpenCode server docs](https://opencode.ai/docs/server/) for the full AP
- **Base image**: `node:24` (Debian)
- **Install**: `opencode-ai` via npm global install
- **User**: dedicated non-root `opencode` user
- **Container tooling**: Podman rootless (`podman`, `uidmap`, `slirp4netns`, `fuse-overlayfs`)
- **Entrypoint**: `opencode serve`
- **Default port**: `4096`