From d002206c3e73171721d2b7616cf2d9c0afddcd6c Mon Sep 17 00:00:00 2001 From: Stefan Scherer Date: Wed, 10 Nov 2021 09:17:07 +0100 Subject: [PATCH 1/2] Make getting started guide faster Signed-off-by: Stefan Scherer --- Dockerfile | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 60fce0c..4b43f6d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,20 +5,24 @@ WORKDIR /app COPY requirements.txt . RUN pip install -r requirements.txt -# Run tests to validate app FROM node:12-alpine AS app-base -RUN apk add --no-cache python g++ make WORKDIR /app COPY app/package.json app/yarn.lock ./ -RUN yarn install COPY app/spec ./spec COPY app/src ./src + +# Run tests to validate app +FROM app-base AS test +RUN apk add --no-cache python3 g++ make +RUN yarn install RUN yarn test # Clear out the node_modules and create the zip FROM app-base AS app-zip-creator -RUN rm -rf node_modules && \ - apk add zip && \ +COPY app/package.json app/yarn.lock ./ +COPY app/spec ./spec +COPY app/src ./src +RUN apk add zip && \ zip -r /app.zip /app # Dev-ready container - actual files will be mounted in From 782d9421aef5f0a77d56c87478cfa5f31f4f05b6 Mon Sep 17 00:00:00 2001 From: Stefan Scherer Date: Wed, 10 Nov 2021 09:17:28 +0100 Subject: [PATCH 2/2] Add dependencies for Apple silicon / M1 / arm64 builds Signed-off-by: Stefan Scherer --- docs/tutorial/our-application/index.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/tutorial/our-application/index.md b/docs/tutorial/our-application/index.md index fceca1f..cb2747f 100644 --- a/docs/tutorial/our-application/index.md +++ b/docs/tutorial/our-application/index.md @@ -38,6 +38,8 @@ see a few flaws in the Dockerfile below. But, don't worry! We'll go over them. ```dockerfile FROM node:12-alpine + # Adding build tools to make yarn install work on Apple silicon / arm64 machines + RUN apk add --no-cache python3 g++ make WORKDIR /app COPY . . RUN yarn install --production