File tree 2 files changed +10
-8
lines changed
2 files changed +10
-8
lines changed Original file line number Diff line number Diff line change 1
1
ARG ALPINECI_TAG
2
2
FROM unfor19/alpine-ci:${ALPINECI_TAG} as base
3
3
4
- # Do your stuff ...
4
+ # Do your "build" stuff ...
5
5
WORKDIR /code/
6
- RUN curl -s https://catfact.ninja/fact | jq -r .fact > random_cat_fact .txt
6
+ RUN curl -s https://catfact.ninja/fact | jq -r .fact > fact .txt
7
7
8
+ # Use Docker multi-stage
8
9
FROM ubuntu:20.04 as app
9
10
WORKDIR /app/
10
11
COPY --from=base /code/* /app/
11
- CMD cat random_cat_fact .txt
12
+ CMD find -type f -name * .txt -exec cat {} \;
Original file line number Diff line number Diff line change @@ -44,14 +44,15 @@ zip 3.0
44
44
ARG ALPINECI_TAG
45
45
FROM unfor19/alpine-ci:${ALPINECI_TAG} as base
46
46
47
- # Do your stuff ...
47
+ # Do your "build" stuff ...
48
48
WORKDIR /code/
49
- RUN curl -s https://catfact.ninja/fact | jq -r .fact > random_cat_fact .txt
49
+ RUN curl -s https://catfact.ninja/fact | jq -r .fact > fact .txt
50
50
51
- FROM alpine:3.12 as app
51
+ # Use Docker multi-stage
52
+ FROM ubuntu:20.04 as app
52
53
WORKDIR /app/
53
- COPY --from base /code/* /app/
54
- CMD cat random_cat_fact .txt
54
+ COPY --from= base /code/* /app/
55
+ CMD find -type f -name * .txt -exec cat {} \;
55
56
```
56
57
57
58
- Build your image
You can’t perform that action at this time.
0 commit comments