Skip to content

Commit 5ba1721

Browse files
author
Meir Gabay
committed
use find
1 parent ab95eb8 commit 5ba1721

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

Dockerfile.example

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
ARG ALPINECI_TAG
22
FROM unfor19/alpine-ci:${ALPINECI_TAG} as base
33

4-
# Do your stuff ...
4+
# Do your "build" stuff ...
55
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
77

8+
# Use Docker multi-stage
89
FROM ubuntu:20.04 as app
910
WORKDIR /app/
1011
COPY --from=base /code/* /app/
11-
CMD cat random_cat_fact.txt
12+
CMD find -type f -name *.txt -exec cat {} \;

README.md

+6-5
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,15 @@ zip 3.0
4444
ARG ALPINECI_TAG
4545
FROM unfor19/alpine-ci:${ALPINECI_TAG} as base
4646

47-
# Do your stuff ...
47+
# Do your "build" stuff ...
4848
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
5050

51-
FROM alpine:3.12 as app
51+
# Use Docker multi-stage
52+
FROM ubuntu:20.04 as app
5253
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 {} \;
5556
```
5657

5758
- Build your image

0 commit comments

Comments
 (0)