a2a-sin-code-tool / Dockerfile
SIN-Deploy-Bot
fix: add execute permission for start.sh to prevent runtime crash
256b7ec
Raw
History Blame
1.11 kB
FROM python:3.11-slim
WORKDIR /app
# System deps + wget
RUN apt-get update && apt-get install -y \
git \
curl \
ca-certificates \
wget \
&& rm -rf /var/lib/apt/lists/*
# opencode CLI – robust mit curl + retry
RUN set -eux; \
for i in 1 2 3; do \
echo "Downloading opencode v1.3.17 (attempt $i)..." ; \
curl -fL --retry 3 --retry-delay 2 -o opencode.deb "https://github.com/anomalyco/opencode/releases/download/v1.3.17/opencode-desktop-linux-amd64.deb" && break || sleep 5; \
done; \
dpkg -i opencode.deb || apt-get install -f -y; \
rm -f opencode.deb; \
apt-get clean; \
rm -rf /var/lib/apt/lists/*; \
echo "== opencode version =="; opencode --version || true
# Python deps
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# App Code (achtet .dockerignore)
COPY . /app
# Fix permissions for entrypoint
RUN chmod +x /app/start.sh
# Workspace
RUN mkdir -p /workspace
EXPOSE 7860
ENV HF_SPACE=true PORT=7860
# Use start.sh as entrypoint (sets up opencode config, then execs uvicorn)
ENTRYPOINT ["/app/start.sh"]