Skip to content

Instantly share code, notes, and snippets.

@stephendarling
Created June 20, 2020 17:27
Show Gist options
  • Select an option

  • Save stephendarling/633dc750f1347b9fd5a5dc9a188b96d2 to your computer and use it in GitHub Desktop.

Select an option

Save stephendarling/633dc750f1347b9fd5a5dc9a188b96d2 to your computer and use it in GitHub Desktop.

Revisions

  1. stephendarling created this gist Jun 20, 2020.
    17 changes: 17 additions & 0 deletions Dockerfile
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,17 @@
    # Create first image as Builder
    FROM node:12.16.1-alpine As builder

    WORKDIR /usr/src/app

    COPY package.json package-lock.json ./

    RUN npm install

    COPY . .

    RUN npm run build --prod

    FROM nginx:1.15.8-alpine

    # Copy files from the first image using the builder reference
    COPY --from=builder /usr/src/app/dist/app-test/ /usr/share/nginx/html