File tree 1 file changed +9
-5
lines changed 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -5,20 +5,24 @@ WORKDIR /app
5
5
COPY requirements.txt .
6
6
RUN pip install -r requirements.txt
7
7
8
- # Run tests to validate app
9
8
FROM node:12-alpine AS app-base
10
- RUN apk add --no-cache python g++ make
11
9
WORKDIR /app
12
10
COPY app/package.json app/yarn.lock ./
13
- RUN yarn install
14
11
COPY app/spec ./spec
15
12
COPY app/src ./src
13
+
14
+ # Run tests to validate app
15
+ FROM app-base AS test
16
+ RUN apk add --no-cache python3 g++ make
17
+ RUN yarn install
16
18
RUN yarn test
17
19
18
20
# Clear out the node_modules and create the zip
19
21
FROM app-base AS app-zip-creator
20
- RUN rm -rf node_modules && \
21
- apk add zip && \
22
+ COPY app/package.json app/yarn.lock ./
23
+ COPY app/spec ./spec
24
+ COPY app/src ./src
25
+ RUN apk add zip && \
22
26
zip -r /app.zip /app
23
27
24
28
# Dev-ready container - actual files will be mounted in
You can’t perform that action at this time.
0 commit comments