diff --git a/docs/Containerfile.5.md b/docs/Containerfile.5.md index 7fd517e41..dda2b312e 100644 --- a/docs/Containerfile.5.md +++ b/docs/Containerfile.5.md @@ -142,7 +142,7 @@ Current supported mount TYPES are bind, cache, secret and tmpfs. The relabel=private and Z options tell the engine to label the content with a private unshared label. Only the current container can use a private mount. Relabeling walks the file system under the mount and changes the label on each file, if the mount has thousands of inodes, this process takes a long time, delaying the start of the container. - + ยท rw, read-write: allows writes on the mount. Options specific to tmpfs: @@ -606,6 +606,38 @@ The secret needs to be passed to the build using the --secret flag. The final im $ podman build --build-arg HTTPS_PROXY=https://my-proxy.example.com . ``` +**ARG** Platform/OS/Arch + -- ARG + + Additional semiautomatic predefined `ARG` variables are available to + assist when producing multi-arch manifest-lists or foreign-architecture + images. The purpose of each of of these variables should mostly be + evident from their names. Where the "BUILD" prefix signifies details + about the host performing the build, and the "TARGET" prefix represents + the intended platform for the content. + + Each of the following ARG variables must be defined empty before use, + within each `FROM` section of the `Containerfile`. If not defined, they + will _not_ be populated with values at build time. Not all variables + are applicable to every OS and/or ARCH (for example `VARIANT`). + + * `BUILDPLATFORM`: for example "linux/amd64" + * `BUILDOS`: for example "linux" + * `BUILDARCH`: for example "amd64" + * `BUILDVARIANT`: uncommonly used, specific to arch. + * `TARGETPLATFORM` + * `TARGETOS` + * `TARGETARCH` + * `TARGETVARIANT` + + Example `Containerfile`: + + ``` + FROM busybox + ARG TARGETARCH + RUN curl -sSf -O https://example.com/app/downloads/foo-${TARGETARCH}.zip + ``` + **ONBUILD** -- `ONBUILD [INSTRUCTION]` The **ONBUILD** instruction adds a trigger instruction to an image. The