Spaces:
Paused
Paused
Update Dockerfile
Browse files- Dockerfile +13 -1
Dockerfile
CHANGED
|
@@ -1,13 +1,25 @@
|
|
| 1 |
FROM oven/bun:1-debian
|
| 2 |
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
|
|
|
|
| 5 |
RUN git clone -b dev https://github.com/anomalyco/opencode.git /app
|
|
|
|
| 6 |
WORKDIR /app
|
| 7 |
RUN bun install
|
| 8 |
|
|
|
|
| 9 |
RUN bun build --compile -o /app/opencode ./packages/opencode/src/index.ts
|
| 10 |
|
|
|
|
| 11 |
ENV OPENCODE_DATA_DIR=/data
|
| 12 |
WORKDIR /data
|
| 13 |
|
|
|
|
| 1 |
FROM oven/bun:1-debian
|
| 2 |
|
| 3 |
+
# 1. Python aur build tools install karo (Zaroori!)
|
| 4 |
+
RUN apt-get update && apt-get install -y \
|
| 5 |
+
python3 \
|
| 6 |
+
python3-pip \
|
| 7 |
+
build-essential \
|
| 8 |
+
g++ \
|
| 9 |
+
git \
|
| 10 |
+
curl \
|
| 11 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 12 |
|
| 13 |
+
# 2. OpenCode clone karo
|
| 14 |
RUN git clone -b dev https://github.com/anomalyco/opencode.git /app
|
| 15 |
+
|
| 16 |
WORKDIR /app
|
| 17 |
RUN bun install
|
| 18 |
|
| 19 |
+
# 3. Binary build karo
|
| 20 |
RUN bun build --compile -o /app/opencode ./packages/opencode/src/index.ts
|
| 21 |
|
| 22 |
+
# 4. Setup
|
| 23 |
ENV OPENCODE_DATA_DIR=/data
|
| 24 |
WORKDIR /data
|
| 25 |
|