overleaf/services/web/Dockerfile
Jakob Ackermann 5c7251afce Merge pull request #2596 from overleaf/jpa-build-scripts-1-3-5
[misc] align the Dockerfile to the build scripts version 1.3.5

GitOrigin-RevId: cdda059b68068b9b4de87520cff91ce179426836
2020-02-13 04:20:31 +00:00

26 lines
444 B
Docker

FROM node:10.19.0 as base
WORKDIR /app
# install_deps changes app files and installs npm packages
# as such it has to run at a later stage
FROM base as app
#wildcard as some files may not be in all repos
COPY package.json package-lock.json /app/
RUN npm install --quiet
COPY . /app
FROM base
COPY --from=app /app /app
WORKDIR /app
RUN chmod 0755 ./install_deps.sh && ./install_deps.sh
USER node
CMD ["node", "--expose-gc", "app.js"]