Skip to content

feat: add OpenShell sandbox image variant - #113

Merged
pavelanni merged 3 commits into
mainfrom
feature/openshell-image
Nov 6, 2026
Merged

pavelanni merged 3 commits into
mainfrom
feature/openshell-image

Conversation

@pavelanni

Copy link
Copy Markdown
Collaborator

Summary

  • Add Containerfile.openshell: UBI 10 minimal (pinned digest), non-root 1001:0, binary at /usr/local/bin/docsclaw with no symlink, writable /workspace, bash and sleep, default sleep infinity.
  • Add make image-openshell for local builds.
  • Publish ghcr.io/redhat-et/docsclaw:<version>-openshell (amd64 + arm64 manifest) from GoReleaser.

Base choice: UBI 10 minimal, not micro. sandbox exec defaults to bash -lc and micro ships no bash; minimal ships both bash and sleep. Measured image size: 138 MB.

Verification

  • make image-openshell builds; podman exec checks: uid 1001, command -v docsclaw -> /usr/local/bin/docsclaw, readlink -f same path (no symlink), docsclaw --version -> docsclaw version dev, /workspace writable, sleep 1 works.
  • goreleaser release --snapshot --clean --skip=publish succeeded and built both -openshell-amd64 and -openshell-arm64.
  • goreleaser check exits 2 on pre-existing deprecated properties (dockers, docker_manifests, brews); the unmodified config fails identically.
  • make lint 0 issues; markdownlint-cli2 0 issues.
  • docsclaw ask does not exist yet (WP06), so the config-dir error path was verified with docsclaw serve --config-dir /nonexistent (exit 1).

🤖 Generated with Claude Code

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Pavel Anni <[email protected]>
Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Pavel Anni <[email protected]>
@coderabbitai

coderabbitai Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Pavel Anni <[email protected]>
@pavelanni
pavelanni marked this pull request as ready for review November 6, 2026 23:48
@pavelanni
pavelanni merged commit fd7be87 into main Nov 6, 2026
5 checks passed
@pavelanni
pavelanni deleted the feature/openshell-image branch November 6, 2026 23:48
pavelanni added a commit that referenced this pull request Nov 16, 2026
The -openshell image entries and the combined docker_manifests have been in
.goreleaser.yaml since #113; publication happens at the next tagged release
and is verified by T7.

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Pavel Anni <[email protected]>
pavelanni added a commit that referenced this pull request Nov 16, 2026
* fix(openshell): build the image for both architectures

The base was pinned to a single-architecture arm64 digest, so an amd64
build failed at the first RUN step with "Exec format error" while still
producing an image named -amd64. The image-openshell target also never
passed --platform, so OPENARCH=amd64 cross-compiled the binary but reused
the cached arm64 layers, yielding an arm64 image with an amd64 binary.

Use the multi-arch ubi-minimal:10.1 index and pass the matching --platform.
Create /sandbox next to /workspace because the Kubernetes driver mounts
the workspace PVC there and the image rootfs is not writable on that
driver.

Closes #130
Closes #131

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Pavel Anni <[email protected]>

* fix(openshell): derive the build arch from the builder and move to UBI 10.3

OPENARCH defaulted to the local `go env GOARCH`, so a PODMAN_CONNECTION
build requested the client's architecture from a remote engine and failed
with "Exec format error". Derive it from the engine that will build.

The base tag now floats (pre-production), so build with --pull=newer to
keep UBI's CVE rebuilds flowing, and move to ubi-minimal:10.3. Document
/sandbox for the Kubernetes driver in deploy/README.md and record the
no-digest-pin policy in the repo guides.

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Pavel Anni <[email protected]>

* fix(openshell): handle the Docker engine and exercise the binary in the arch check

Docker's `build --pull` is a boolean and rejects `--pull=newer`, so select
the pull flag from CONTAINER_ENGINE. Also run `docsclaw --version` in the
arch regression row so a labelled-but-wrong-arch binary fails the check.

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Pavel Anni <[email protected]>

* chore(openspec): mark the GoReleaser openshell task done

The -openshell image entries and the combined docker_manifests have been in
.goreleaser.yaml since #113; publication happens at the next tagged release
and is verified by T7.

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Pavel Anni <[email protected]>

---------

Signed-off-by: Pavel Anni <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant