Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-52239

[RHEL EPIC] Create --compat-volumes option to Build and Farm Build - RHEL 9.5

    • Create --compat-volumes option to Build and Farm Build - RHEL 9.5
    • Hide

      The following needs to be verified in order for this epic to be considered complete:

      • The command works as documented.
      Show
      The following needs to be verified in order for this epic to be considered complete: The command works as documented.
    • rhel-sst-container-tools
    • False
    • Hide

      None

      Show
      None
    • Yes
    • Dev ack, Docs ack, PXE ack
    • Enhancement
    • Hide
      .The `--compat-volumes` option is available for Podman and Buildah

      You can use the new `--compat-volumes` option with the `buildah build`, `podman build`, and `podman farm build` commands.
      This option triggers special handling for the contents of directories marked using the `VOLUME` instruction such that their contents can subsequently only be modified by `ADD` and `COPY` instructions. Any changes made in those locations by `RUN` Instructions will be discarded. Previously, this behavior was the default, but it is now disabled by default.
      Show
      .The `--compat-volumes` option is available for Podman and Buildah You can use the new `--compat-volumes` option with the `buildah build`, `podman build`, and `podman farm build` commands. This option triggers special handling for the contents of directories marked using the `VOLUME` instruction such that their contents can subsequently only be modified by `ADD` and `COPY` instructions. Any changes made in those locations by `RUN` Instructions will be discarded. Previously, this behavior was the default, but it is now disabled by default.
    • Done

      Description

      SME: rhn-engineering-nalin 

      The --compat-volumes option has been added to the Buildah build command, along with the Podman `build` and `farm build` commands.

      It was created with this PR in Buildah: https://github.com/containers/buildah/pull/5604.

      This change aligns the build process with Docker's BuildKit. There has been confusion when users have tried using an image created in BuildKit on Podman, and there have been incompatibilities.

      The old behavior of handling volumes in the builds can be turned on by setting the `--compat-volumes` option to true in the command line.  The default for the option is false, which emulates BuildKit's functionality.

       

      Man page entry for reference:

      {}--compat-volumes{}

      Handle directories marked using the VOLUME instruction (both in this build, and
      those inherited from base images) such that their contents can only be modified
      by ADD and COPY instructions. Any changes made in those locations by RUN
      instructions will be reverted. Before the introduction of this option, this
      behavior was the default, but it is now disabled by default.

       

              tsweeney@redhat.com Tom Sweeney
              tsweeney@redhat.com Tom Sweeney
              Container Runtime Eng Bot Container Runtime Eng Bot
              Container Runtime Bugs Bot Container Runtime Bugs Bot
              Gabriela Necasova Gabriela Necasova
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: