Commit Graph

9 Commits

Author SHA1 Message Date
OpenShift Merge Robot 10c10eedd2
Merge pull request #2895 from rhatdan/push
Make buildah push support pushing manifests lists and digests
2021-01-08 08:44:41 -05:00
Daniel J Walsh 57dde8e977
Make buildah push support pushing manifests lists and digests
Currently manifests just look like images in container storage.
It is surprising to the user when they go to push the images
that they end up failing, and have to use the buildah manifest push.

This patch causes buildah push to failover to buildah manifest push
if the image is a manifest.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-01-08 06:36:11 -05:00
Daniel J Walsh 7acdfe8e8d
Add support for --manifest flags
This patch allows users to build a multi arch image with simple commands
using emulation software.

```
buildah bud --arch arm --manifest myimage /tmp/mysrc
buildah bud --arch amd64 --manifest myimage /tmp/mysrc
buildah bud --arch s390x --manifest myimage /tmp/mysrc
```

And something like this for buildah commit
```
build() {
	ctr=$(./bin/buildah from --arch $1 ubi8)
	./bin/buildah run $ctr dnf install -y iputils
	./bin/buildah commit --manifest ubi8ping $ctr
}
build arm
build amd64
build s390x
```

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-01-07 14:41:02 -05:00
Qi Wang 2ddc22c2dd Skip tlsVerify insecure BUILD_REGISTRY_SOURCES
If the registry is set to insecure allowd using BUILD_REGISTRY_SOURCES, hardcode to skip the tls verify to avoid the errors.
Returns error if set insecureRegistries but force to use tls-verify.

Signed-off-by: Qi Wang <qiwan@redhat.com>
2020-10-13 15:57:42 -04:00
Ed Santiago 6c1494c530 New CI check: xref --help vs man pages
Run 'buildah --help', recursively against all subcommands,
then cross-reference the results against docs/buildah*.md.
Report differences in subcommands and/or flags.

The majority of the changes in this PR are trivial (see
below) but a handful may be controversial and require
careful review:

  * Making 'bud' the default output of 'buildah help',
    with 'build-using-dockerfile' as an alias. This is
    the inverse of the situation until now: buildah
    would list build-using-dockerfile as the primary
    name. The man page, OTOH, lists 'bud'. The source
    file name is 'bud'. I suspect that most people
    type 'bud'. So, for consistency, I choose to make
    'bud' the default visible command.

  * add --encryption-key and --encrypt-layer documentation
    to buildah-commit.md, and --encrypt-layer to -push.md.
    Please double-check the wording here.

  * remove --notruncate from buildah-images.md. The option
    does not exist (although there is a TODO comment in
    the code). If it should exist, it is left to the
    reader to implement. I would humbly suggest that this
    is a good idea, for consistency with buildah containers.

  * remove --shm-size from buildah-pull.md. The option
    does not exist, and I suspect this was a copy-paste error.

  * remove --security-opt from run.go. It was unimplemented
    and undocumented.

  * remove --userns-[gu]id-map from buildah-bud.md. These
    are global options, not bud options, and are documented
    well enough in buildah.bud.

Trivial (IMO) changes:

  * split options in man pages, from '**--foo, -f**'
    to '**--foo**, **-f**'. This conforms with the style
    used in podman man pages.

  * add missing one-letter aliases (usually "-q", "-a")

  * add missing man page entries for some easy options

  * sort out-of-order subcommand listings in man pages

Finally, do note that this is a copy-and-alter duplicate of the
original script in podman, and that is horrible. In an ideal
world I would've been able to refactor the podman version into
something usable on both repos (and then more). It turns out the
differences in man page format and in special-case handling are
too broad to let me do a clean refactor.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2020-10-01 04:55:24 -06:00
Flavio Castelli 64e95b0926
Uniform some man pages
Small fixes to the man pages:

  * Ensure the explaination of the `--cert-dir` and `--tls-verify` flags
    are consistent across all the commands.
  * Ensure `buildah-login` and `docker-login` man pages are referenced
    by the sub commands that deal with authenticated registries.

Signed-off-by: Flavio Castelli <fcastelli@suse.com>
2020-09-10 10:04:40 +02:00
Nalin Dahyabhai 20820d7184 manifest push: add --format option
Add a --format option, which takes the same values as the --format
option for `buildah push`, to `buildah manifest push`, for cases where
we need to override the default.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2020-02-04 15:37:09 -05:00
Nalin Dahyabhai a925f79cc3 add --sign-by to bud/commit/push, --remove-signatures for pull/push
Add the --sign-by option to `buildah build-using-dockerfile`,
`buildah commit`, `buildah push`, and `buildah manifest push`.  Add the
`--remove-signatures` option to `buildah pull`, `buildah push`, and
`buildah manifest push`.  We just pass them to the image library, which
does all of the heavy lifting.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>

Closes: #2085
Approved by: rhatdan
2020-01-17 18:22:34 +00:00
Nalin Dahyabhai 691c394956 buildah: add a "manifest" command
Add an initial version of a "manifest" command.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>

Closes: #1902
Approved by: rhatdan
2019-10-28 15:15:35 +00:00