File tree 2 files changed +7
-0
lines changed
2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change 1
1
# Use the base image with Node.js
2
2
FROM node:12
3
+ RUN useradd -m -s /bin/bash appuser
3
4
ARG NODE_ENV
4
5
ARG BABEL_ENV
5
6
@@ -18,6 +19,9 @@ COPY . /challenge-engine-ui
18
19
# Set working directory for future use
19
20
WORKDIR /challenge-engine-ui
20
21
22
+ RUN chown -R appuser:appuser /challenge-engine-ui
23
+ USER appuser
24
+
21
25
# Install the dependencies from package.json
22
26
RUN echo "NODE ENV in Docker: $NODE_ENV"
23
27
RUN echo "BABEL ENV in Docker: $BABEL_ENV"
Original file line number Diff line number Diff line change 1
1
FROM node:10.17.0-stretch
2
+ RUN useradd -m -s /bin/bash appuser
2
3
RUN apt update
3
4
RUN apt install sudo
4
5
RUN sudo apt-get update; sudo apt-get install -y openjdk-8-jre openjdk-8-jre-headless openjdk-8-jdk openjdk-8-jdk-headless;
@@ -26,6 +27,8 @@ RUN printf '#!/bin/sh\nXvfb :99 -screen 0 1280x1024x24 &\nexec "$@"\n' > /tmp/en
26
27
27
28
COPY . /test-automation
28
29
WORKDIR /test-automation
30
+ RUN chown -R appuser:appuser /test-automation
31
+ USER appuser
29
32
RUN npm install
30
33
RUN ./node_modules/.bin/webdriver-manager update --versions.chrome=="$(google-chrome -version)"
31
34
ENTRYPOINT ["/docker-entrypoint.sh" ]
You can’t perform that action at this time.
0 commit comments