Skip to content

Commit

Permalink
Merge pull request #7021 from topcoder-platform/pm-200
Browse files Browse the repository at this point in the history
PM-200: default user privilege
  • Loading branch information
hentrymartin authored Jan 7, 2025
2 parents 27c437c + 7777ccf commit c70ace6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,14 @@

FROM node:8.11.2
LABEL app="Community App" version="1.0"
RUN useradd -m -s /bin/bash appuser

WORKDIR /opt/app
COPY . .

RUN chown -R appuser:appuser /opt/app
USER appuser

################################################################################
# Receiving of build arguments.

Expand Down
3 changes: 3 additions & 0 deletions automated-smoke-test/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM node:10.17.0-stretch
RUN useradd -m -s /bin/bash appuser
RUN apt update
RUN apt install sudo
RUN sudo apt-get update; sudo apt-get install -y openjdk-8-jre openjdk-8-jre-headless openjdk-8-jdk openjdk-8-jdk-headless;
Expand Down Expand Up @@ -26,6 +27,8 @@ RUN printf '#!/bin/sh\nXvfb :99 -screen 0 1280x1024x24 &\nexec "$@"\n' > /tmp/en

COPY . /automated-smoke-test
WORKDIR /automated-smoke-test
RUN chown -R appuser:appuser /automated-smoke-test
USER appuser
RUN npm install
RUN ./node_modules/.bin/webdriver-manager update --versions.chrome=="$(google-chrome -version)"
ENTRYPOINT ["/docker-entrypoint.sh"]
Expand Down

0 comments on commit c70ace6

Please sign in to comment.