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

Commit

Permalink
Merge pull request #487 from paritytech/as-fix-mdbook
Browse files Browse the repository at this point in the history
add nonroot user mdbook-utils
  • Loading branch information
alvicsam authored Nov 23, 2022
2 parents aec374e + e05d9e4 commit e14aae4
Showing 1 changed file with 9 additions and 0 deletions.
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

0 comments on commit e14aae4

Please sign in to comment.