revert opencode to version 1.x
CI / Build opencode docker images (push) Successful in 50s

This commit is contained in:
2026-09-22 21:06:57 +08:00
parent 75fff0e585
commit 86d2c817fc
2 changed files with 25 additions and 26 deletions
+4 -5
View File
@@ -14,12 +14,13 @@ USER builder
WORKDIR /home/builder
ADD --chown=builder:builder --keep-git-dir=true git@github.com:anomalyco/opencode.git#v${OPENCODE_VERSION} opencode
WORKDIR /home/builder/opencode
ENV BUN_COMPILE_RELEASE=bun-v${BUN_VERSION}
ENV OPENCODE_CHANNEL=prod
ENV OPENCODE_VERSION=${OPENCODE_VERSION}
RUN --mount=type=cache,target=/home/builder/.bun/install/cache,uid=1126 bun install
#ADD --chown=builder:builder ./build.ts ./packages/cli/script/build.ts --single
RUN --mount=type=cache,target=/home/builder/.bun/install/cache,uid=1126 ./packages/cli/script/build.ts --single
ADD --chown=builder:builder ./build.ts ./packages/opencode/script/build.ts
RUN --mount=type=cache,target=/home/builder/.bun/install/cache,uid=1126 ./packages/opencode/script/build.ts
@@ -40,7 +41,7 @@ RUN echo 'PATH DEFAULT=${HOME}/.local/bin:${HOME}/.cargo/bin:/usr/local/bin:/bin
RUN rm repository.key
RUN --mount=type=cache,target=/var/cache/pacman pacman -Syu --noconfirm
RUN --mount=type=cache,target=/var/cache/pacman pacman -S --noconfirm --needed \
xdg-utils rustup rust-analyzer jdtls python-pipx ripgrep git rustup gradle curl sccache openssh \
xdg-utils rustup rust-analyzer python-pipx ripgrep git rustup gradle curl sccache openssh \
bash-language-server marksman python-lsp-server vscode-css-languageserver x86_64-unknown-linux-musl-zlib x86_64-unknown-linux-musl-gcc \
vscode-html-languageserver vscode-json-languageserver yaml-language-server base-devel docker docker-buildx docker-compose less websocat \
npm gtk3 alsa-lib trunk
@@ -49,12 +50,10 @@ RUN useradd -m -d /var/lib/opencode opencode
RUN mkdir /workspace
RUN chown opencode:opencode /workspace
USER opencode
RUN pipx install pyright
RUN pipx install pip-tools
USER root
ADD --chown=opencode:opencode ./opencode.json /etc/opencode/opencode.json
RUN mkdir -p /usr/lib/opencode/addons
ADD --chmod=644 https://repo1.maven.org/maven2/org/projectlombok/lombok/1.18.46/lombok-1.18.46.jar /usr/lib/opencode/addons/lombok.jar
ENV OPENCODE_CONFIG=/etc/opencode/opencode.json
USER opencode
WORKDIR /workspace