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
22
33ENV USERNAME timetracker
44ENV HOME /home/${USERNAME}
5- RUN useradd -ms /bin/bash ${USERNAME}
5+ RUN useradd --create-home - ms /bin/bash ${USERNAME}
66
77WORKDIR ${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
910RUN 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} . .
1312
1413USER ${USERNAME}
1514EXPOSE 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 \
3131 && curl http://chromedriver.storage.googleapis.com/$CHROME_DRIVER_VERSION/chromedriver_linux64.zip -o /opt/selenium/chromedriver_linux64.zip \
3232 && cd /opt/selenium; unzip /opt/selenium/chromedriver_linux64.zip; rm -rf chromedriver_linux64.zip; ln -fs /opt/selenium/chromedriver /usr/local/bin/chromedriver;
3333
34- RUN useradd -ms /bin/bash ${USERNAME}
34+
35+ RUN useradd --create-home -ms /bin/bash ${USERNAME}
3536
3637WORKDIR ${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 ./
4039RUN 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+
4243
4344USER ${USERNAME}
4445EXPOSE 4200
You can’t perform that action at this time.
0 commit comments