Add auth
This commit is contained in:
25
Dockerfile
25
Dockerfile
@@ -31,25 +31,34 @@ RUN --mount=type=cache,target=/go/pkg/mod \
|
||||
|
||||
# Stage 2: Create directory structure
|
||||
FROM alpine:3.19 as dirsetup
|
||||
RUN mkdir -p /logs && \
|
||||
chmod 777 /logs && \
|
||||
touch /logs/decypharr.log && \
|
||||
chmod 666 /logs/decypharr.log
|
||||
RUN mkdir -p /data/logs && \
|
||||
chmod 777 /data/logs && \
|
||||
touch /data/logs/decypharr.log && \
|
||||
chmod 666 /data/logs/decypharr.log
|
||||
|
||||
# Stage 3: Final image
|
||||
FROM gcr.io/distroless/static-debian12:nonroot
|
||||
|
||||
LABEL version = "${VERSION}-${CHANNEL}"
|
||||
|
||||
LABEL org.opencontainers.image.source = "https://github.com/sirrobot01/debrid-blackhole"
|
||||
LABEL org.opencontainers.image.title = "debrid-blackhole"
|
||||
LABEL org.opencontainers.image.authors = "sirrobot01"
|
||||
LABEL org.opencontainers.image.documentation = "https://github.com/sirrobot01/debrid-blackhole/blob/main/README.md"
|
||||
|
||||
# Copy binaries
|
||||
COPY --from=builder --chown=nonroot:nonroot /blackhole /blackhole
|
||||
COPY --from=builder --chown=nonroot:nonroot /healthcheck /healthcheck
|
||||
|
||||
# Copy pre-made directory structure
|
||||
COPY --from=dirsetup --chown=nonroot:nonroot /logs /logs
|
||||
COPY --from=dirsetup --chown=nonroot:nonroot /data /data
|
||||
|
||||
# Metadata
|
||||
ENV LOG_PATH=/logs
|
||||
ENV LOG_PATH=/data/logs
|
||||
EXPOSE 8181 8282
|
||||
VOLUME ["/app"]
|
||||
VOLUME ["/data", "/app"]
|
||||
USER nonroot:nonroot
|
||||
|
||||
HEALTHCHECK CMD ["/healthcheck"]
|
||||
CMD ["/blackhole", "--config", "/app/config.json"]
|
||||
|
||||
CMD ["/blackhole", "--config", "/data"]
|
||||
Reference in New Issue
Block a user