Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
11 changes: 5 additions & 6 deletions Docker/Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,14 @@ FROM node:14

ENV USERNAME timetracker
ENV HOME /home/${USERNAME}
RUN useradd -ms /bin/bash ${USERNAME}
RUN useradd --create-home -ms /bin/bash ${USERNAME}

WORKDIR ${HOME}/time-tracker-ui
COPY package.json package-lock.json ./
COPY package*.json ./
RUN chown ${USERNAME}:${USERNAME} -R ${HOME}/time-tracker-ui
RUN npm cache clean --force && npm install
COPY . .
RUN chown ${USERNAME}:${USERNAME} -R ${HOME}/time-tracker-ui \
&& chmod -R 777 ${HOME}/time-tracker-ui
COPY --chown=${USERNAME}:${USERNAME} . .

USER ${USERNAME}
EXPOSE 4200
CMD ${HOME}/time-tracker-ui/node_modules/.bin/ng serve --host 0.0.0.0 --disableHostCheck
CMD ${HOME}/time-tracker-ui/node_modules/.bin/ng serve --host 0.0.0.0 --disableHostCheck=false --poll 2000
11 changes: 6 additions & 5 deletions Docker/Dockerfile.test
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,15 @@ RUN mkdir -p /opt/selenium \
&& curl http://chromedriver.storage.googleapis.com/$CHROME_DRIVER_VERSION/chromedriver_linux64.zip -o /opt/selenium/chromedriver_linux64.zip \
&& cd /opt/selenium; unzip /opt/selenium/chromedriver_linux64.zip; rm -rf chromedriver_linux64.zip; ln -fs /opt/selenium/chromedriver /usr/local/bin/chromedriver;

RUN useradd -ms /bin/bash ${USERNAME}

RUN useradd --create-home -ms /bin/bash ${USERNAME}

WORKDIR ${HOME}/time-tracker-ui
COPY package.json package-lock.json ./
RUN npm cache clean --force && npm install
COPY . .
COPY package*.json ./
RUN chown ${USERNAME}:${USERNAME} -R ${HOME}/time-tracker-ui
RUN chmod -R 777 ${HOME}/time-tracker-ui
RUN npm cache clean --force && npm install
COPY --chown=${USERNAME}:${USERNAME} . .


USER ${USERNAME}
EXPOSE 4200
Expand Down