From 8c46d65fc5eed8683b27c4656707966f8fdeeabe Mon Sep 17 00:00:00 2001 From: Geert Stappers Date: Wed, 30 Aug 2023 11:08:06 +0200 Subject: [PATCH] Dockerfile: Drop user nobody Docker user has to be set with --user UID:GID to match UID and GID of the git repositoris on the filesystem to avoid 'repository path '/git/foo/' is not owned by current user' errors. Ownership of the executable doesn't matter. --- Dockerfile | 2 -- 1 file changed, 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index d68762c..b1801aa 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,11 +5,9 @@ RUN apt-get update && apt-get install -y libssl-dev pkg-config COPY . /sources WORKDIR /sources RUN cargo build --release -RUN chown nobody:nogroup /sources/target/release/rgit FROM debian:bullseye-slim COPY --from=builder /sources/target/release/rgit /rgit -USER nobody EXPOSE 8000 ENTRYPOINT ["/rgit", "[::]:8000", "/git", "-d", "/tmp/rgit-cache.db"]