-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
25 lines (19 loc) · 775 Bytes
/
Dockerfile
File metadata and controls
25 lines (19 loc) · 775 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
FROM node:alpine
RUN apk update && apk upgrade --no-cache && \
apk add --no-cache python3 py3-pip curl bash tar && \
pip3 install --break-system-packages uv && \
curl -fsSL https://opencode.ai/install | bash && \
# Verify installation
ls -la $HOME/.opencode/bin/ && \
echo 'export PATH="$HOME/.opencode/bin:$PATH"' >> ~/.bashrc
RUN mkdir -p /config /data/sessions /data/snapshots /data/log /projects /mcp
COPY docker-entrypoint.sh /usr/local/bin/
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
# Copy config - support both .json and .jsonc
COPY config/opencode.json* /config/
RUN if [ -f /config/opencode.jsonc ]; then \
mv /config/opencode.jsonc /config/opencode.json; \
fi
EXPOSE 4096
ENTRYPOINT ["docker-entrypoint.sh"]
CMD ["web"]