This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user