File size: 870 Bytes
23b2b1a c1a8b3d 23b2b1a c1a8b3d 23b2b1a c1a8b3d 23b2b1a c1a8b3d 23b2b1a c1a8b3d 23b2b1a c1a8b3d 23b2b1a | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | FROM python:3.9-slim
ENV DEBIAN_FRONTEND=noninteractive \
HOME=/root \
PATH=/root/.opencode/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/sbin:/bin \
PORT=7860
# Runtime deps: curl/unzip for the installer, git + ripgrep for the agent.
RUN apt-get update && apt-get install -y --no-install-recommends \
curl ca-certificates git unzip bash jq ripgrep \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY requirements.txt /app/requirements.txt
RUN pip install --no-cache-dir -r /app/requirements.txt
# Install the prebuilt opencode binary (linux-x64 / linux-arm64).
RUN curl -fsSL https://opencode.ai/install | bash
COPY app.py /app/app.py
RUN chmod -R 777 /app
# Workspace used as the agent's project directory.
RUN mkdir -p /app/workspace && chmod -R 777 /app/workspace
WORKDIR /app/workspace
EXPOSE 7860
CMD ["python", "/app/app.py"] |