feat(opencode): migrate agent runtime to v2
This commit is contained in:
+6
-2
@@ -1,10 +1,11 @@
|
||||
FROM smanx/opencode:latest AS base
|
||||
FROM ubuntu:24.04 AS base
|
||||
USER root
|
||||
ARG UBUNTU_APT_MIRROR=
|
||||
ARG OPENCODE_VERSION=0.0.0-next-16741
|
||||
ARG PYPI_INDEX_URL=https://pypi.tuna.tsinghua.edu.cn/simple
|
||||
ARG PYPI_TRUSTED_HOST=pypi.tuna.tsinghua.edu.cn
|
||||
ENV VIRTUAL_ENV=/opt/venv
|
||||
ENV PATH="$VIRTUAL_ENV/bin:/root/.local/bin:$PATH"
|
||||
ENV PATH="$VIRTUAL_ENV/bin:/root/.local/bin:/root/.bun/bin:$PATH"
|
||||
ENV PIP_INDEX_URL=${PYPI_INDEX_URL}
|
||||
ENV PIP_TRUSTED_HOST=${PYPI_TRUSTED_HOST}
|
||||
ENV UV_INDEX_URL=${PYPI_INDEX_URL}
|
||||
@@ -16,6 +17,7 @@ RUN if [ -n "${UBUNTU_APT_MIRROR}" ]; then \
|
||||
sed -i "s|http://archive.ubuntu.com|https://${UBUNTU_APT_MIRROR}|g; s|http://security.ubuntu.com|https://${UBUNTU_APT_MIRROR}|g" /etc/apt/sources.list.d/*.sources 2>/dev/null || true; \
|
||||
fi && \
|
||||
apt-get update && apt-get install -y --no-install-recommends \
|
||||
ca-certificates \
|
||||
curl \
|
||||
jq \
|
||||
unzip \
|
||||
@@ -25,6 +27,8 @@ RUN if [ -n "${UBUNTU_APT_MIRROR}" ]; then \
|
||||
mv /usr/local/bun-linux-x64 /usr/local/bun && \
|
||||
ln -sf /usr/local/bun/bun /usr/local/bin/bun && \
|
||||
rm -f /tmp/bun.zip && \
|
||||
bun install --global --trust "@opencode-ai/cli@${OPENCODE_VERSION}" && \
|
||||
opencode2 --version && \
|
||||
curl -LsSf https://astral.sh/uv/install.sh | sh && \
|
||||
ln -s /root/.local/bin/uv /usr/local/bin/uv && \
|
||||
ln -sf /usr/bin/python3 /usr/local/bin/python && \
|
||||
|
||||
Reference in New Issue
Block a user