feat: cleanup docker
perso/opencode/pipeline/head Something is wrong with the build of this commit

This commit is contained in:
Julien Cabillot
2026-04-15 12:47:27 -04:00
parent 6cbb8d9989
commit 7a7162180a
3 changed files with 9 additions and 50 deletions
+6 -4
View File
@@ -10,16 +10,18 @@ This repository builds and publishes a Docker image for [OpenCode](https://openc
.
├── Dockerfile # Image definition
├── Jenkinsfile # CI/CD pipeline (nightly build + Docker Hub push)
├── opencode-attach # Helper script for attaching to a running server
└── README.md # Usage documentation
```
## Dockerfile conventions
- **Base image**: `node:24-alpine` — use the latest Node.js LTS Alpine image.
- **Install**: `npm i -g opencode-ai` — installs OpenCode globally.
- **Base image**: `node:24` — Debian-based Node.js image (not Alpine, needed for apt packages).
- **Install**: `npm i -g opencode-ai n2-soul@<version>` — installs OpenCode and Soul globally.
- **Version check**: `RUN opencode --version` after install to validate the build and record the installed version in build logs.
- **Dedicated user**: a non-root `opencode` user and group are created with `addgroup`/`adduser`. All runtime steps run as this user.
- **Entrypoint**: `["opencode", "serve"]` — the container always starts the HTTP server.
- **Dedicated user**: a non-root `opencode` user and group are created with `groupadd`/`useradd` (UID/GID 1000). All runtime steps run as this user.
- **Cluster tooling**: `kubectl` is copied from the official `registry.k8s.io/kubectl` image (multi-stage COPY).
- **Entrypoint**: `["opencode"]` — arguments are passed at runtime (e.g. `serve`).
## Jenkinsfile conventions