Merge pull request #2409 from spotify/rugvip/docsync

create-app: sync backend Dockerfile
This commit is contained in:
Patrik Oldsberg
2020-09-10 20:56:43 +02:00
committed by GitHub
@@ -2,8 +2,15 @@ FROM node:12
WORKDIR /usr/src/app
COPY . .
# Copy repo skeleton first, to avoid unnecessary docker cache invalidation.
# The skeleton contains the package.json of each package in the monorepo,
# and along with yarn.lock and the root package.json, that's enough to run yarn install.
ADD yarn.lock package.json skeleton.tar ./
RUN yarn install --frozen-lockfile --production
# This will copy the contents of the dist-workspace when running the build-image command.
# Do not use this Dockerfile outside of that command, as it will copy in the source code instead.
COPY . .
CMD ["node", "packages/backend"]