From ac4707398843d7cd82c862a592f4d73c326283a5 Mon Sep 17 00:00:00 2001 From: Matt Kilgore Date: Sun, 5 Jan 2025 12:48:00 -0500 Subject: [PATCH] Lets try this --- Dockerfile.rootless | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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"