buildah push supports manifest type conversion when pushing using the 'dir' transport
Manifest types include oci, v2s1, and v2s2
e.g buildah push --format v2s2 alpine dir:my-directory
Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
Closes: #321
Approved by: rhatdan
Adds support for converting manifest types when using the dir transport
Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
Closes: #321
Approved by: rhatdan
Add a test that makes sure that "buildah run" fails if it can't resolve
the name of the user for the container.
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
Closes: #313
Approved by: rhatdan
* Use chroot() instead of trying to read the right file ourselves.
This should resolve#66.
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
Closes: #313
Approved by: rhatdan
Change our behavior when we're given USER with a numeric UID and no GID,
so that we no longer error out if the UID doesn't correspond to a known
user so that we can use that user's primary GID. Instead, use GID 0.
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
Closes: #313
Approved by: rhatdan
Add a test that makes sure we catch cases where we attempt to open a
file in the container's tree that's actually a symlink that points out
of the tree.
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
Closes: #313
Approved by: rhatdan
Drop fallbacks for resolving USER values that attempt to look up names
on the host, since that's never predictable.
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
Closes: #313
Approved by: rhatdan
Switch fopenContainerFile from using Stat/Lstat after opening the file
to using openat() to walk the given path, resolving links to keep them
from escaping the container's root fs. This should resolve#66.
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
Closes: #313
Approved by: rhatdan
We don't need to mount the container for this test or add files to it,
and switching to a smaller base image that already includes a "hostname"
command means we don't need to run a package installer in the container.
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
Closes: #320
Approved by: nalind
Default to running integration tests using /var/tmp as scratch space,
since it's more likely to support proper SELinux labeling than /tmp,
which is more likely to be on a tmpfs.
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
Closes: #320
Approved by: nalind
A basic introduction to buildah tutorial
Topics covered:
buildah from a base
briefly describes containers/storage and containers/image
buildah run
buildah from scratch
installing packages and files to a scratch image
buildah push and running a buildah built container in docker
buildah bud
Signed-off-by: William Henry <whenry@redhat.com>
Closes: #302
Approved by: rhatdan
Thanks to Máirín Duffy for building these logos for e Buildah project
Patch also fixes references to the project Buildah to be upper case.
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This patch will allow for the possibility of a valid "-"
option value. This is often used for taking from STDIN,
and should future proof us from this breaking if ever added.
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Add options for specifying the root location when we're running unit
tests, so that we don't try to use the system's default location, which
we should avoid messing with if we can.
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
Add targets to the top-level Makefile for running unit and integration
tests, and start having Travis run the unit tests.
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
In unit tests that assume that one or more images are present, make sure
we actually have pulled some images.
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>