Skip to content

A continuation of HomeBox the inventory and organization system built for the Home User

CHOWN the required directories

Katos1f197f748a35
diff --git a/Dockerfile.rootless b/Dockerfile.rootless
index 6a80addd..e20c5b97 100644
--- a/Dockerfile.rootless
+++ b/Dockerfile.rootless
@@ -72,9 +72,6 @@ RUN mkdir /app
COPY --from=builder /go/bin/api /app
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
LABEL Name=homebox Version=0.0.1
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
VOLUME [ "/data" ]
+# Set ownership for required directories
+RUN chown -R nonroot:nonroot /app /data /app/api
+
# Entrypoint and CMD
USER nonroot
ENTRYPOINT [ "/app/api" ]