From 17092aac6b356275fb2d6eebaf74cae3cc4994cf Mon Sep 17 00:00:00 2001 From: Andreas Salhus Bakseter <141913422+baksetercx@users.noreply.github.com> Date: Wed, 17 Apr 2024 10:04:12 +0200 Subject: [PATCH] Fix Dockerfile --- .github/gh-actions-docs/Dockerfile | 9 +++++++++ .github/gh-actions-docs/README.md | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/gh-actions-docs/Dockerfile b/.github/gh-actions-docs/Dockerfile index 0b04098..2dbc186 100644 --- a/.github/gh-actions-docs/Dockerfile +++ b/.github/gh-actions-docs/Dockerfile @@ -11,4 +11,13 @@ COPY app ./app RUN cabal install --overwrite-policy=always +ARG USERNAME=gh-actions-docs +ARG USER_UID=1000 +ARG USER_GID=$USER_UID + +RUN groupadd --gid $USER_GID $USERNAME \ + && useradd --uid $USER_UID --gid $USER_GID $USERNAME +RUN chown -R $USERNAME . +USER $USERNAME + ENTRYPOINT ["gh-actions-docs"] diff --git a/.github/gh-actions-docs/README.md b/.github/gh-actions-docs/README.md index e7f969f..324b7a1 100644 --- a/.github/gh-actions-docs/README.md +++ b/.github/gh-actions-docs/README.md @@ -24,7 +24,7 @@ If this parameter is missing, the "Permissions" section will not be generated. ```bash docker build . -t gh-actions-docs:latest -docker run -v $(pwd):/app gh-actions-docs:latest +docker run -v $(pwd):/opt/app gh-actions-docs:latest ``` ### Local