Skip to content

Instantly share code, notes, and snippets.

@ErickWendel
Created August 10, 2019 02:24
Show Gist options
  • Save ErickWendel/ff0bdeb408b1ceb9b1e3dd3d50f5c490 to your computer and use it in GitHub Desktop.
Save ErickWendel/ff0bdeb408b1ceb9b1e3dd3d50f5c490 to your computer and use it in GitHub Desktop.
FROM node:10-alpine AS ts-sample-builder
RUN mkdir -p /src
COPY package.json /src/package.json
WORKDIR /src
RUN npm install
COPY . /src
RUN npm run build
CMD npm start
# # Our Second stage, that creates an image for production
FROM node:10-alpine AS ts-sample-prod
WORKDIR /src
COPY --from=ts-sample-builder ./src/lib ./lib
COPY package* ./
RUN npm install --production
CMD npm start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment