1
1
mirror of https://github.com/orhun/git-cliff.git synced 2024-12-01 21:13:24 +03:00

fix(docker): remove custom user creation from the Dockerfile (#109)

This commit is contained in:
Orhun Parmaksız 2022-09-24 18:44:41 +02:00
parent 078bdc3f7a
commit 5cb991d4e3
No known key found for this signature in database
GPG Key ID: F83424824B3E4B90

View File

@ -26,17 +26,8 @@ RUN cargo build --release --locked --no-default-features
RUN rm -f target/release/deps/git_cliff*
FROM debian:buster-slim as runner
RUN apt-get update && \
apt-get install -y --no-install-recommends \
--allow-unauthenticated git \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
COPY --from=builder /app/target/release/git-cliff /usr/local/bin
RUN groupadd -r git && \
useradd -r -g git -d /git-home -s /sbin/nologin git-user
WORKDIR git-home
RUN chown -R git-user:git /git-home
USER git-user
RUN git config --global --add safe.directory '/git-home/app'
RUN cat <<'EOF' > entrypoint.sh
#!/bin/sh
cp -r /app /git-home/app