CHOWN the required directories

This commit is contained in:
Katos
2025-01-05 16:40:17 +00:00
committed by GitHub
parent 0484bbb0c3
commit 1f197f748a

View File

@@ -72,9 +72,6 @@ RUN mkdir /app
COPY --from=builder /go/bin/api /app COPY --from=builder /go/bin/api /app
RUN chmod +x /app/api RUN chmod +x /app/api
# Set ownership for required directories
RUN chown -R nonroot:nonroot /app /data /app/api
# Labels and configuration for the final image # Labels and configuration for the final image
LABEL Name=homebox Version=0.0.1 LABEL Name=homebox Version=0.0.1
LABEL org.opencontainers.image.source="https://github.com/sysadminsmedia/homebox" LABEL org.opencontainers.image.source="https://github.com/sysadminsmedia/homebox"
@@ -90,6 +87,9 @@ HEALTHCHECK --interval=30s --timeout=5s --start-period=5s --retries=3 \
# Persist volume # Persist volume
VOLUME [ "/data" ] VOLUME [ "/data" ]
# Set ownership for required directories
RUN chown -R nonroot:nonroot /app /data /app/api
# Entrypoint and CMD # Entrypoint and CMD
USER nonroot USER nonroot
ENTRYPOINT [ "/app/api" ] ENTRYPOINT [ "/app/api" ]