Skip to content

Instantly share code, notes, and snippets.

@fabricionaweb
Forked from ernestofreyreg/Dockerfile
Created March 13, 2020 21:50
Show Gist options
  • Save fabricionaweb/bcf1a9e1015185b0bd478d46b130bdd7 to your computer and use it in GitHub Desktop.
Save fabricionaweb/bcf1a9e1015185b0bd478d46b130bdd7 to your computer and use it in GitHub Desktop.
FROM mhart/alpine-node:10 AS builder
WORKDIR /app
COPY package.json .
RUN yarn install
COPY . .
RUN yarn build && yarn --production
FROM mhart/alpine-node:10
WORKDIR /app
COPY --from=builder /app .
EXPOSE 3000
CMD ["node_modules/.bin/next", "start"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment