Fix Log file permissions

This commit is contained in:
Mukhtar Akere
2025-01-23 02:11:37 +01:00
parent 0b1c1af8b8
commit 2ae4bd571e
2 changed files with 10 additions and 2 deletions

View File

@@ -17,11 +17,20 @@ ADD . .
# Build
RUN CGO_ENABLED=0 GOOS=$(echo $TARGETPLATFORM | cut -d '/' -f1) GOARCH=$(echo $TARGETPLATFORM | cut -d '/' -f2) go build -ldflags="-X github.com/sirrobot01/debrid-blackhole/pkg/version.Version=${VERSION} -X github.com/sirrobot01/debrid-blackhole/pkg/version.Channel=${CHANNEL}" -o /blackhole
FROM alpine as logsetup
RUN mkdir -p /logs && \
touch /logs/decypharr.log && \
chown -R 1000:1000 /logs && \
chmod -R 755 /logs && \
chmod 666 /logs/decypharr.log
FROM scratch
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=builder /blackhole /blackhole
COPY --from=builder /app/README.md /README.md
ENV LOG_PATH=/app/logs
COPY --from=logsetup /logs /logs
ENV LOG_PATH=/logs
EXPOSE 8181 8282