Skip to content

Instantly share code, notes, and snippets.

@teitei-tk teitei-tk/Dockerfile

Created Jul 28, 2020
Embed
What would you like to do?
Next.js with Docker multi stage build
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
You can’t perform that action at this time.