mirror of
https://github.com/0x2E/fusion.git
synced 2026-05-19 18:30:35 +00:00
f74d2d071e
Keep the container running as root until existing /data database files owned by root are migrated, avoiding startup write-permission failures.
18 lines
665 B
Docker
18 lines
665 B
Docker
FROM alpine:3.21.0
|
|
ARG TARGETOS=linux
|
|
ARG TARGETARCH
|
|
LABEL org.opencontainers.image.source="https://github.com/0x2E/fusion"
|
|
|
|
RUN addgroup -S fusion && adduser -S -D -H -h /fusion -G fusion fusion && \
|
|
mkdir -p /data && chown -R fusion:fusion /data
|
|
|
|
WORKDIR /fusion
|
|
COPY --chown=fusion:fusion --chmod=755 build/fusion-${TARGETOS}-${TARGETARCH} ./fusion
|
|
EXPOSE 8080
|
|
VOLUME ["/data"]
|
|
ENV DB="/data/fusion.db"
|
|
HEALTHCHECK --interval=10s --timeout=3s --start-period=2s --retries=3 \
|
|
CMD wget -q -O /dev/null http://127.0.0.1:8080/api/oidc/enabled || exit 1
|
|
# TODO: Temporarily run as root until legacy /data DB files owned by root are migrated.
|
|
CMD [ "./fusion" ]
|