fix: copy opencode bin from builder instead of manual symlink
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
npm install -g creates the bin symlink in the builder stage; copying it directly avoids the dangling symlink on chmod.
This commit is contained in:
parent
cfec11bb46
commit
2c1ea02386
1 changed files with 2 additions and 3 deletions
|
|
@ -42,11 +42,10 @@ RUN curl -fsSL "https://dl.k8s.io/release/${KUBECTL_VERSION}/bin/linux/amd64/kub
|
||||||
RUN curl -fsSL "https://get.helm.sh/helm-${HELM_VERSION}-linux-amd64.tar.gz" \
|
RUN curl -fsSL "https://get.helm.sh/helm-${HELM_VERSION}-linux-amd64.tar.gz" \
|
||||||
| tar -xz -C /usr/local/bin --strip-components=1 linux-amd64/helm
|
| tar -xz -C /usr/local/bin --strip-components=1 linux-amd64/helm
|
||||||
|
|
||||||
# Copy opencode from builder
|
# Copy opencode from builder (node, modules, and the npm-generated bin symlink)
|
||||||
COPY --from=opencode-builder /usr/local/lib/node_modules /usr/local/lib/node_modules
|
COPY --from=opencode-builder /usr/local/lib/node_modules /usr/local/lib/node_modules
|
||||||
COPY --from=opencode-builder /usr/local/bin/node /usr/local/bin/node
|
COPY --from=opencode-builder /usr/local/bin/node /usr/local/bin/node
|
||||||
RUN ln -sf /usr/local/lib/node_modules/opencode-ai/cli.js /usr/local/bin/opencode && \
|
COPY --from=opencode-builder /usr/local/bin/opencode /usr/local/bin/opencode
|
||||||
chmod +x /usr/local/bin/opencode
|
|
||||||
|
|
||||||
# Create agent user
|
# Create agent user
|
||||||
RUN useradd -m -u 1000 -s /bin/bash agent
|
RUN useradd -m -u 1000 -s /bin/bash agent
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue