From d60d9a705a9a354c7d64229be7bb5b0cdedf6fd0 Mon Sep 17 00:00:00 2001 From: Dustin Masters Date: Sat, 23 Mar 2019 19:06:52 -0400 Subject: [PATCH] Add docker build --- .dockerignore | 4 ++++ .github/main.workflow | 9 +++++++++ Dockerfile.mono | 26 ++++++++++++++++++++++++++ 3 files changed, 39 insertions(+) create mode 100644 .dockerignore create mode 100644 .github/main.workflow create mode 100644 Dockerfile.mono diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 000000000..f12ca4ef2 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,4 @@ +.git/ +node_modules/ +dist/ +*.generated.js diff --git a/.github/main.workflow b/.github/main.workflow new file mode 100644 index 000000000..fbb648c43 --- /dev/null +++ b/.github/main.workflow @@ -0,0 +1,9 @@ +workflow "Build, Test" { + on = "push" + resolves = ["Docker build"] +} + +action "Docker build" { + uses = "actions/docker/cli@master" + args = "build . -f Dockerfile.mono" +} diff --git a/Dockerfile.mono b/Dockerfile.mono new file mode 100644 index 000000000..f334ee3e7 --- /dev/null +++ b/Dockerfile.mono @@ -0,0 +1,26 @@ +FROM node:10 AS node-build + +COPY . /app + +WORKDIR /app/src/React.Core + +RUN npm i +RUN npm run build + +WORKDIR /app/src/React.Core/babel-legacy + +RUN npm i +RUN npm run build + +WORKDIR /app/src/React.Sample.Webpack.CoreMvc + +RUN npm i +RUN npm run build + +FROM mono:latest AS mono + +COPY . /app + +COPY --from=node-build /app/src/React.Core/Resources /app/src/React.Core/Resources + +RUN mono --version