FROM python:3.11-slim WORKDIR /app # Install system dependencies RUN apt-get update && apt-get install -y \ curl \ && rm -rf /var/lib/apt/lists/* # Install OpenCode RUN curl -fsSL https://opencode.ai/install | bash # Copy OpenCode configuration COPY config_opencode /root/.config/opencode # Copy session manager COPY . /app # Install Python dependencies RUN pip install --no-cache-dir -r requirements.txt # Create working directory and auth directory RUN mkdir -p /app/somedir /root/.local/share/opencode # Expose port EXPOSE 8080 # Set environment variables ENV PYTHONPATH=/app # Start OpenCode server (mDNS disabled to prevent conflicts between containers) CMD ["/bin/bash", "-c", "source /root/.bashrc && opencode serve --hostname 0.0.0.0 --port 8080"]