Created
July 28, 2020 16:56
-
-
Save teitei-tk/5bd9dd7e8422bbd3583c9fca411e2f9c to your computer and use it in GitHub Desktop.
Next.js with Docker multi stage build
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM node:12.18.2-alpine as builder | |
WORKDIR /app | |
COPY package.json . | |
COPY yarn.lock . | |
COPY tsconfig.json . | |
RUN yarn install --production | |
FROM node:12.18.2-alpine | |
COPY --from=builder /app/node_modules /app/node_modules | |
COPY . . | |
EXPOSE 3000 | |
CMD [ "yarn", "dev" ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment