Skip to content
Closed
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
Prev Previous commit
Next Next commit
Set copy of package.json and npm install before copying all other pro…
…ject files (#906)

* Set copy of package.json and npm install before copying all other project files

* Fix error on COPY on Dockerfiles

Co-authored-by: Gustavo Lozada <[email protected]>
  • Loading branch information
GuLozada99 and Gustavo Lozada authored Aug 2, 2022
commit c32641cded17c64f86064413583d6522a7d5e9dd
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 ./
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