github.com/containers/podman/v5@v5.1.0-rc1/docs/source/markdown/options/build-context.md (about) 1 ####> This option file is used in: 2 ####> podman build, farm build 3 ####> If file is edited, make sure the changes 4 ####> are applicable to all of those. 5 #### **--build-context**=*name=value* 6 7 Specify an additional build context using its short name and its location. 8 Additional build contexts can be referenced in the same manner as we access 9 different stages in COPY instruction. 10 11 Valid values are: 12 13 * Local directory – e.g. --build-context project2=../path/to/project2/src (This option is not available with the remote Podman client. On Podman machine setup (i.e macOS and Windows) path must exists on the machine VM) 14 * HTTP URL to a tarball – e.g. --build-context src=https://example.org/releases/src.tar 15 * Container image – specified with a container-image:// prefix, e.g. --build-context alpine=container-image://alpine:3.15, (also accepts docker://, docker-image://) 16 17 On the Containerfile side, reference the build context on all 18 commands that accept the “from” parameter. Here’s how that might look: 19 20 ```dockerfile 21 FROM [name] 22 COPY --from=[name] ... 23 RUN --mount=from=[name] … 24 ``` 25 26 The value of [name] is matched with the following priority order: 27 28 * Named build context defined with --build-context [name]=.. 29 * Stage defined with AS [name] inside Containerfile 30 * Image [name], either local or in a remote registry