forked from microsoft/BotFramework-WebChat
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
31 additions
and
0 deletions.
There are no files selected for viewing
31 changes: 31 additions & 0 deletions
31
samples/19.a.single-sign-on-for-enterprise-apps/Dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Builder is based on Node.js 12 image | ||
# This builder image will build HTML and JavaScript code out of the create-react-app project | ||
FROM node:12 AS builder-web | ||
WORKDIR /var/web/ | ||
|
||
# Copy the web app code to /var/web/ | ||
# We excluded /.env and /node_modules/ via .dockerignore | ||
ADD app/ /var/web/ | ||
|
||
# Doing a fresh "npm install" on build to make sure the image is reproducible | ||
RUN npm ci | ||
|
||
# Build the web app code via create-react-app and react-scripts | ||
RUN npm run build | ||
|
||
FROM node:12 | ||
|
||
ADD bot/ /var/bot/ | ||
ADD rest-api/ /var/web/ | ||
COPY --from=builder-web /var/web/build/ /var/web/public/ | ||
|
||
WORKDIR /var/bot/ | ||
RUN npm ci | ||
|
||
WORKDIR /var/web/ | ||
RUN npm ci | ||
|
||
WORKDIR /var/ | ||
RUN tar -cf build.tgz bot web | ||
|
||
ENTRYPOINT sh |