| 1 |
FROM mirror.gcr.io/alpine as multistagebase |
| 2 |
COPY multistage/dir/a.txt / |
| 3 |
WORKDIR /tmp |
| 4 |
RUN touch /base.txt tmp.txt |
| 5 |
|
| 6 |
FROM multistagebase as second |
| 7 |
COPY dir/file / |
| 8 |
RUN touch /second.txt |
| 9 |
|
| 10 |
FROM mirror.gcr.io/alpine |
| 11 |
COPY --from=1 /second.txt /third.txt |
| 12 |
|
| 13 |
FROM mirror.gcr.io/alpine |
| 14 |
COPY --from=2 /third.txt /fourth.txt |
| 15 |
|
| 16 |
FROM mirror.gcr.io/alpine |
| 17 |
COPY --from=multistagebase /base.txt /fifth.txt |
| 18 |
COPY --from=multistagebase ./tmp/tmp.txt /tmp.txt |
| 19 |
# "mirror.gcr.io/golang:1.25" has a default working directory of /go, and /go/src is a directory |
| 20 |
COPY --from=mirror.gcr.io/golang:1.25 go/src /src |
| 21 |
|
| 22 |
FROM multistagebase as final |
| 23 |
COPY copy/script / |
| 24 |
RUN touch /final.txt |