fix mounts; backward compatibility

This commit is contained in:
Mukhtar Akere
2025-02-13 05:07:14 +01:00
parent 6f4f72d781
commit bfd2596367
21 changed files with 71 additions and 466 deletions

View File

@@ -31,10 +31,10 @@ RUN --mount=type=cache,target=/go/pkg/mod \
# Stage 2: Create directory structure
FROM alpine:3.19 as dirsetup
RUN mkdir -p /data/logs && \
chmod 777 /data/logs && \
touch /data/logs/decypharr.log && \
chmod 666 /data/logs/decypharr.log
RUN mkdir -p /app/logs && \
chmod 777 /app/logs && \
touch /app/logs/decypharr.log && \
chmod 666 /app/logs/decypharr.log
# Stage 3: Final image
FROM gcr.io/distroless/static-debian12:nonroot
@@ -51,14 +51,15 @@ COPY --from=builder --chown=nonroot:nonroot /blackhole /usr/bin/blackhole
COPY --from=builder --chown=nonroot:nonroot /healthcheck /usr/bin/healthcheck
# Copy pre-made directory structure
COPY --from=dirsetup --chown=nonroot:nonroot /data /data
COPY --from=dirsetup --chown=nonroot:nonroot /app /app
# Metadata
ENV LOG_PATH=/data/logs
ENV LOG_PATH=/app/logs
EXPOSE 8181 8282
VOLUME ["/data", "/app"]
VOLUME ["/app"]
USER nonroot:nonroot
HEALTHCHECK CMD ["/usr/bin/healthcheck"]
CMD ["/usr/bin/blackhole", "--config", "/data/config.json"]
CMD ["/usr/bin/blackhole", "--config", "/app"]