build(docker): fix agent image build
This commit is contained in:
+5
-4
@@ -15,10 +15,10 @@ RUN sed -i "s|http://archive.ubuntu.com|https://${UBUNTU_APT_MIRROR}|g; s|http:/
|
||||
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 && \
|
||||
apt-get update && apt-get install -y --no-install-recommends \
|
||||
curl \
|
||||
jq \
|
||||
unzip \
|
||||
python3 \
|
||||
python3-venv && \
|
||||
jq && \
|
||||
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 && \
|
||||
@@ -52,7 +52,9 @@ RUN bun install --frozen-lockfile
|
||||
FROM base AS build
|
||||
WORKDIR /app
|
||||
|
||||
COPY tsconfig.json opencode.json README.md ./
|
||||
COPY --from=deps /app/node_modules ./node_modules
|
||||
COPY --from=deps /app/.opencode/node_modules ./.opencode/node_modules
|
||||
COPY tsconfig.json opencode.json README.md .gitignore ./
|
||||
COPY src ./src
|
||||
COPY .opencode ./.opencode
|
||||
RUN bun run check
|
||||
@@ -67,7 +69,7 @@ ENV PORT=8787
|
||||
COPY --from=deps /app/node_modules ./node_modules
|
||||
COPY --from=deps /app/.opencode/node_modules ./.opencode/node_modules
|
||||
COPY package.json bun.lock ./
|
||||
COPY tsconfig.json opencode.json ./
|
||||
COPY tsconfig.json opencode.json .gitignore ./
|
||||
COPY src ./src
|
||||
COPY .opencode ./.opencode
|
||||
|
||||
@@ -75,7 +77,6 @@ COPY entrypoint.sh /entrypoint.sh
|
||||
RUN chmod +x /entrypoint.sh
|
||||
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
COPY .opencode ./.opencode
|
||||
|
||||
EXPOSE 8787
|
||||
CMD ["bun", "src/server.ts"]
|
||||
|
||||
Reference in New Issue
Block a user