File tree Expand file tree Collapse file tree 2 files changed +11
-11
lines changed Expand file tree Collapse file tree 2 files changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -2,15 +2,14 @@ FROM node:14
2
2
3
3
ENV USERNAME timetracker
4
4
ENV HOME /home/${USERNAME}
5
- RUN useradd -ms /bin/bash ${USERNAME}
5
+ RUN useradd --create-home - ms /bin/bash ${USERNAME}
6
6
7
7
WORKDIR ${HOME}/time-tracker-ui
8
- COPY package.json package-lock.json ./
8
+ COPY package*.json ./
9
+ RUN chown ${USERNAME}:${USERNAME} -R ${HOME}/time-tracker-ui
9
10
RUN npm cache clean --force && npm install
10
- COPY . .
11
- RUN chown ${USERNAME}:${USERNAME} -R ${HOME}/time-tracker-ui \
12
- && chmod -R 777 ${HOME}/time-tracker-ui
11
+ COPY --chown=${USERNAME}:${USERNAME} . .
13
12
14
13
USER ${USERNAME}
15
14
EXPOSE 4200
16
- CMD ${HOME}/time-tracker-ui/node_modules/.bin/ng serve --host 0.0.0.0 --disableHostCheck
15
+ CMD ${HOME}/time-tracker-ui/node_modules/.bin/ng serve --host 0.0.0.0 --disableHostCheck=false --poll 2000
Original file line number Diff line number Diff line change @@ -31,14 +31,15 @@ RUN mkdir -p /opt/selenium \
31
31
&& curl http://chromedriver.storage.googleapis.com/$CHROME_DRIVER_VERSION/chromedriver_linux64.zip -o /opt/selenium/chromedriver_linux64.zip \
32
32
&& cd /opt/selenium; unzip /opt/selenium/chromedriver_linux64.zip; rm -rf chromedriver_linux64.zip; ln -fs /opt/selenium/chromedriver /usr/local/bin/chromedriver;
33
33
34
- RUN useradd -ms /bin/bash ${USERNAME}
34
+
35
+ RUN useradd --create-home -ms /bin/bash ${USERNAME}
35
36
36
37
WORKDIR ${HOME}/time-tracker-ui
37
- COPY package.json package-lock.json ./
38
- RUN npm cache clean --force && npm install
39
- COPY . .
38
+ COPY package*.json ./
40
39
RUN chown ${USERNAME}:${USERNAME} -R ${HOME}/time-tracker-ui
41
- RUN chmod -R 777 ${HOME}/time-tracker-ui
40
+ RUN npm cache clean --force && npm install
41
+ COPY --chown=${USERNAME}:${USERNAME} . .
42
+
42
43
43
44
USER ${USERNAME}
44
45
EXPOSE 4200
You can’t perform that action at this time.
0 commit comments