Skip to content

Commit

Permalink
Make getting started guide faster
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Scherer <[email protected]>
  • Loading branch information
StefanScherer committed Nov 10, 2021
1 parent e04817f commit d002206
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d002206

Please sign in to comment.