Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
Set copy of package.json and npm install before copying all other pro…
…ject files
  • Loading branch information
Gustavo Lozada committed Jul 25, 2022
commit c1e8d0416c1a99b72819cd52ccae0eb77e08f371
3 changes: 2 additions & 1 deletion Docker/Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@ ENV HOME /home/${USERNAME}
RUN useradd -ms /bin/bash ${USERNAME}

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

USER ${USERNAME}
RUN npm cache clean --force && npm install
EXPOSE 4200
CMD ${HOME}/time-tracker-ui/node_modules/.bin/ng serve --host 0.0.0.0 --disableHostCheck
3 changes: 2 additions & 1 deletion Docker/Dockerfile.test
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,13 @@ RUN mkdir -p /opt/selenium \
RUN useradd -ms /bin/bash ${USERNAME}

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

USER ${USERNAME}
EXPOSE 4200
EXPOSE 9876
RUN npm cache clean --force && npm install
CMD npm run ci-test