This commit is contained in:
Katos
2025-01-05 17:25:11 +00:00
parent 14bb2de584
commit 6ad0c33340

View File

@@ -72,6 +72,9 @@ 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
# Create /data directory and set ownership for required directories
RUN mkdir /data && chown -R nonroot:nonroot /app /app/api /data
# 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"
@@ -87,9 +90,6 @@ 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 /app/api /data
# Entrypoint and CMD # Entrypoint and CMD
USER nonroot USER nonroot
ENTRYPOINT [ "/app/api" ] ENTRYPOINT [ "/app/api" ]