Skip to content

Instantly share code, notes, and snippets.

@lucasdu4rte
Created April 3, 2018 14:02
Show Gist options
  • Select an option

  • Save lucasdu4rte/6205c0aa46c0a4b3e6435b0ac80bd33d to your computer and use it in GitHub Desktop.

Select an option

Save lucasdu4rte/6205c0aa46c0a4b3e6435b0ac80bd33d to your computer and use it in GitHub Desktop.
Dockerfile Node.js and simple server http
### STAGE 1: Build ###
FROM node:9-alpine
RUN yarn global add serve
WORKDIR /usr/src/app
COPY package.json yarn.lock ./
RUN yarn
COPY . ./
RUN yarn build
# Serve with serve ;)
CMD ["serve", "-p", "8080"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment