Update Dockerfile
Browse files- Dockerfile +12 -20
Dockerfile
CHANGED
|
@@ -1,26 +1,18 @@
|
|
| 1 |
-
FROM
|
| 2 |
|
| 3 |
-
# basic tools + tini for clean signal handling
|
| 4 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 5 |
-
ca-certificates curl
|
| 6 |
-
|
| 7 |
|
| 8 |
-
#
|
| 9 |
-
RUN
|
| 10 |
-
|
| 11 |
-
# Install OpenCode (Node method is officially supported)
|
| 12 |
-
RUN npm install -g opencode-ai
|
| 13 |
-
|
| 14 |
-
# Install HF CLI (standalone installer)
|
| 15 |
-
# Official CLI docs: curl -LsSf https://hf.co/cli/install.sh | bash
|
| 16 |
-
RUN curl -LsSf https://hf.co/cli/install.sh | bash
|
| 17 |
-
|
| 18 |
-
USER user
|
| 19 |
-
ENV HOME=/home/user
|
| 20 |
-
ENV PATH="/home/user/.local/bin:/usr/local/bin:${PATH}"
|
| 21 |
|
| 22 |
WORKDIR /app
|
| 23 |
-
COPY
|
|
|
|
|
|
|
|
|
|
| 24 |
|
| 25 |
-
|
| 26 |
-
CMD ["
|
|
|
|
| 1 |
+
FROM debian:bookworm-slim
|
| 2 |
|
|
|
|
| 3 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 4 |
+
ca-certificates curl tar \
|
| 5 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 6 |
|
| 7 |
+
# Install OpenCode binary from GitHub Releases (latest)
|
| 8 |
+
RUN curl -L https://github.com/opencode-ai/opencode/releases/latest/download/opencode-linux-x86_64.tar.gz \
|
| 9 |
+
| tar -xz -C /usr/local/bin opencode
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
|
| 11 |
WORKDIR /app
|
| 12 |
+
COPY . /app
|
| 13 |
+
|
| 14 |
+
ENV OPENCODE_CONFIG=/app/config/opencode.jsonc
|
| 15 |
+
ENV OPENCODE_CONFIG_DIR=/app/config
|
| 16 |
|
| 17 |
+
EXPOSE 7860
|
| 18 |
+
CMD ["opencode", "web", "--hostname", "0.0.0.0", "--port", "7860"]
|