Skip to content

Commit

Permalink
@@option volume.image: be specific that -v only affects RUN
Browse files Browse the repository at this point in the history
Be specific that the `-v` flag only affects RUN instructions.  The
previous wording left it ambiguous, and people might have concluded that
it applied to ADD and COPY as well.

Signed-off-by: Nalin Dahyabhai <[email protected]>
  • Loading branch information
nalind authored and openshift-cherrypick-robot committed Feb 7, 2024
1 parent 81068ed commit 0ac114f
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions docs/source/markdown/options/volume.image.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@
####> are applicable to all of those.
#### **--volume**, **-v**=*[HOST-DIR:CONTAINER-DIR[:OPTIONS]]*

Create a bind mount. Specifying the `-v /HOST-DIR:/CONTAINER-DIR` option, Podman
bind mounts `/HOST-DIR` from the host to `/CONTAINER-DIR` in the Podman
container.
Mount a host directory into containers when executing RUN instructions during
the build.

The `OPTIONS` are a comma-separated list and can be: <sup>[[1]](#Footnote1)</sup>

Expand All @@ -17,12 +16,9 @@ The `OPTIONS` are a comma-separated list and can be: <sup>[[1]](#Footnote1)</sup

The `CONTAINER-DIR` must be an absolute path such as `/src/docs`. The `HOST-DIR`
must be an absolute path as well. Podman bind-mounts the `HOST-DIR` to the
specified path. For example, when specifying the host path `/foo`,
Podman copies the contents of `/foo` to the container filesystem on the host
and bind mounts that into the container.
specified path when processing RUN instructions.

You can specify multiple **-v** options to mount one or more mounts to a
container.
You can specify multiple **-v** options to mount one or more mounts.

You can add the `:ro` or `:rw` suffix to a volume to mount it read-only or
read-write mode, respectively. By default, the volumes are mounted read-write.
Expand Down

0 comments on commit 0ac114f

Please sign in to comment.