File: Dockerfile.multistage

package info (click to toggle)
golang-github-openshift-imagebuilder 1.2.15%2Bds1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,776 kB
  • sloc: makefile: 18; sh: 3; ansic: 1
file content (24 lines) | stat: -rw-r--r-- 566 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
FROM alpine as multistagebase
COPY multistage/dir/a.txt /
WORKDIR /tmp
RUN touch /base.txt tmp.txt

FROM multistagebase as second
COPY dir/file /
RUN touch /second.txt

FROM alpine
COPY --from=1 /second.txt /third.txt

FROM alpine
COPY --from=2 /third.txt /fourth.txt

FROM alpine
COPY --from=multistagebase /base.txt /fifth.txt
COPY --from=multistagebase ./tmp/tmp.txt /tmp.txt
# "golang" has a default working directory of /go, and /go/src is a directory
COPY --from=golang         go/src /src

FROM multistagebase as final
COPY copy/script /
RUN touch /final.txt