Skip to content

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

Lets try this

Matt Kilgoreac4707398843
diff --git a/Dockerfile.rootless b/Dockerfile.rootless
index ec0dafa7..dcf6fc84 100644
--- a/Dockerfile.rootless
+++ b/Dockerfile.rootless
@@ -69,12 +69,10 @@ RUN addgroup -S nonroot && adduser -S nonroot -G nonroot
# Create application directory and copy over built Go binary
RUN mkdir /app
-COPY --from=builder /go/bin/api /app
+COPY --from=builder --chown=nonroot /go/bin/api /app
+COPY --from=builder --chown=nonroot /data /data
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
LABEL Name=homebox Version=0.0.1
LABEL org.opencontainers.image.source="https://github.com/sysadminsmedia/homebox"