opencode-v1 / Dockerfile
z90486091
updated
05c76c0
raw
history blame contribute delete
713 Bytes
FROM debian:12-slim
# Set HOME environment variable
ENV HOME=/root
# Install runtime dependencies
RUN apt-get update && apt-get install -y \
curl \
bash \
git \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
# Install OpenCode using the official installer
RUN curl -fsSL https://opencode.ai/install | bash
# Add OpenCode to PATH
ENV PATH="$HOME/.opencode/bin:$PATH"
# Copy your configuration files
COPY entrypoint.sh /entrypoint.sh
COPY opencode.json /opencode.json
RUN chmod +x /entrypoint.sh
ENV OPENCODE_SERVER_USERNAME=opencode
EXPOSE 8860
ENTRYPOINT ["/entrypoint.sh"]
CMD ["web", "--port", "8860", "--hostname", "0.0.0.0"]