Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

add nonroot user mdbook-utils #487

Merged
merged 1 commit into from
Nov 23, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions dockerfiles/mdbook-utils/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,12 @@ RUN apt-get update -y && \
./rustup-init -y --no-modify-path --profile minimal --default-toolchain stable && \
rm rustup-init && \
cargo install mdbook mdbook-mermaid mdbook-linkcheck mdbook-graphviz mdbook-last-changed

RUN set -x \
&& groupadd -g 1000 nonroot \
&& useradd -u 1000 -g 1000 -s /bin/bash -m nonroot \
&& git config --global --add safe.directory '*' \
&& cp /root/.gitconfig /home/nonroot/.gitconfig \
&& chown nonroot:nonroot /home/nonroot/.gitconfig

USER nonroot:nonroot