opencode
opencode copied to clipboard
[FEATURE]: debian based container
Feature hasn't been suggested before.
- [x] I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
problem
Currently, all OpenCode container images are Alpine-based.
This creates a limitation for users who want to include OpenCode in a non-Alpine base image, such as a Debian-based Python image for development.
For example, the following approach does not work:
FROM python:3.12-bookworm
COPY --from=ghcr.io/anomalyco/opencode:1.1.25 /usr/local/bin/opencode /usr/bin/
ENTRYPOINT ["opencode"]
bash: /usr/bin/opencode: cannot execute: required file not found
with the dive binary inspecting the OpenCode image confirms it is Alpine-based:
ADD alpine-minirootfs-3.23.2-x86_64.tar.gz / # buildkit
RUN |1 BUN_RUNTIME_TRANSPILER_CACHE_PATH=0 /bin/sh -c apk add libgcc libstdc++ ripgrep # buildkit
COPY dist/opencode-linux-x64-baseline-musl/bin/opencode /usr/local/bin/opencode # buildkit
RUN |1 BUN_RUNTIME_TRANSPILER_CACHE_PATH=0 /bin/sh -c opencode --version # buildkit
suggestion
Provide multi-platform / multi-distro tagged container images, for example:
- 1.1.25-alpine
- 1.1.25-trixie (debian 13)
- 1.1.25-bookworm (debian 12)
this would enable the following in a container image
FROM python:3.12-bookworm
COPY --from=ghcr.io/anomalyco/opencode:1.1.25-debian /usr/local/bin/opencode /usr/bin/
FROM python:3.12-trixie
COPY --from=ghcr.io/anomalyco/opencode:1.1.25-trixie /usr/local/bin/opencode /usr/bin/
FROM python:3.12-alpine
COPY --from=ghcr.io/anomalyco/opencode:1.1.25-alpine /usr/local/bin/opencode /usr/bin/