Move Node.js installation before Bun

This commit is contained in:
southseact-3d
2026-02-10 16:03:59 +00:00
parent 0860fc0028
commit 19abee65c8

View File

@@ -28,6 +28,13 @@ RUN apt-get update \
libssl-dev \ libssl-dev \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*
RUN curl -fsSL -o /tmp/node.tar.xz \
"https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-x64.tar.xz" \
&& tar -xJf /tmp/node.tar.xz -C /usr/local --strip-components=1 \
&& ln -sf /usr/local/bin/node /usr/bin/node \
&& ln -sf /usr/local/bin/npm /usr/bin/npm \
&& rm -f /tmp/node.tar.xz
RUN npm install -g bun@${BUN_VERSION} && bun --version RUN npm install -g bun@${BUN_VERSION} && bun --version
RUN curl -fsSL -o /tmp/powershell.tar.gz \ RUN curl -fsSL -o /tmp/powershell.tar.gz \
@@ -42,13 +49,6 @@ RUN curl -fsSL -o /usr/local/bin/ttyd \
"https://github.com/tsl0922/ttyd/releases/download/${TTYD_VERSION}/ttyd.x86_64" \ "https://github.com/tsl0922/ttyd/releases/download/${TTYD_VERSION}/ttyd.x86_64" \
&& chmod +x /usr/local/bin/ttyd && chmod +x /usr/local/bin/ttyd
RUN curl -fsSL -o /tmp/node.tar.xz \
"https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-x64.tar.xz" \
&& tar -xJf /tmp/node.tar.xz -C /usr/local --strip-components=1 \
&& ln -sf /usr/local/bin/node /usr/bin/node \
&& ln -sf /usr/local/bin/npm /usr/bin/npm \
&& rm -f /tmp/node.tar.xz
COPY opencode /opt/opencode-src COPY opencode /opt/opencode-src
WORKDIR /opt/opencode-src WORKDIR /opt/opencode-src