Skip to content

Commit e8c19d4

Browse files
committed
build(docker): pin OpenCode install to a versioned build ARG
Previously the installer always fetched the latest release at build time, making image builds non-reproducible. Introducing OPENCODE_VERSION ARG (default 1.4.0) lets the caller pin or upgrade the version explicitly, and keeps the comment block accurate and actionable.
1 parent ffdf583 commit e8c19d4

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

build/Dockerfile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,12 @@ RUN /tmp/install-node.sh && rm /tmp/install-node.sh
8080
COPY --chown=opencode:opencode build/scripts/install-python.sh /tmp/install-python.sh
8181
RUN /tmp/install-python.sh && rm /tmp/install-python.sh
8282

83-
# OpenCode — always installs the latest release; kept after all toolchains
84-
# so upstream releases don't invalidate toolchain layers
85-
RUN curl -fsSL https://opencode.ai/install | bash
83+
# OpenCode — pinned version via OPENCODE_VERSION build ARG.
84+
# To upgrade: update the ARG default below and rebuild.
85+
# Releases: https://github.com/anomalyco/opencode/releases
86+
# Kept after all toolchains so version bumps only invalidate this layer.
87+
ARG OPENCODE_VERSION=1.4.0
88+
RUN VERSION="${OPENCODE_VERSION}" curl -fsSL https://opencode.ai/install | bash
8689

8790
# ---------------------------------------------------------------------------
8891
# Terminal configuration

0 commit comments

Comments
 (0)