-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
31 lines (23 loc) · 1.08 KB
/
Copy pathDockerfile
File metadata and controls
31 lines (23 loc) · 1.08 KB
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
26
27
28
29
30
31
FROM ghcr.io/anomalyco/opencode:1.18.3
LABEL org.opencontainers.image.source="https://github.com/andersennl/opencode-docker-compose" \
org.opencontainers.image.description="Secure, persistent Docker Compose deployment for the OpenCode web interface" \
org.opencontainers.image.licenses="MIT"
RUN apk add --no-cache ca-certificates curl git openssh-client \
&& addgroup -g 1000 opencode \
&& adduser -D -u 1000 -G opencode -h /home/opencode opencode \
&& mkdir -p /appdata /workspace \
&& chown -R opencode:opencode /appdata /workspace /home/opencode
COPY --chmod=0755 docker-entrypoint.sh /usr/local/bin/opencode-web
COPY --chmod=0755 healthcheck.sh /usr/local/bin/opencode-healthcheck
ENV HOME=/home/opencode \
OPENCODE_DISABLE_AUTOUPDATE=true \
XDG_DATA_HOME=/appdata/share \
XDG_CONFIG_HOME=/appdata/config \
XDG_STATE_HOME=/appdata/state \
XDG_CACHE_HOME=/appdata/cache
WORKDIR /workspace
USER 1000:1000
EXPOSE 4096
HEALTHCHECK --interval=30s --timeout=5s --start-period=15s --retries=3 \
CMD ["opencode-healthcheck"]
ENTRYPOINT ["opencode-web"]