Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add dedicated user #10

Merged
merged 2 commits into from
Jan 4, 2023
Merged
Changes from 1 commit
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
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ RUN install2.r --error --skipinstalled --ncpus -1 \

EXPOSE 3838

RUN chown -R 1000:1000 /app/R && \
RUN adduser --uid "1000" --disabled-password --no-create-home rapporteket && \
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hvis man kutter ut --no-create-home (slik at /home/rapporteket faktisk opprettes) så slipper man advarselen

Warning in dir.create(cache_dir, recursive = TRUE) :
cannot create dir '/home/rapporteket', reason 'Permission denied'

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tok vekk --no-create-home fra min fork

chown -R 1000:1000 /app/R && \
chmod -R 755 /app/R
USER rapporteket

CMD ["R", "-e", "options(shiny.port = 3838, shiny.host = \"0.0.0.0\"); rapadm::run_app()"]