buildah bud was failing to get the secrets data
The issue was buildah bud was not being given the /usr/share/containers/mounts.conf file path
so it had no secrets to mount
Also reworked the way the secrets data was being copied from the host to the container
Signed-off-by: umohnani8 <umohnani@redhat.com>
Fixes the naming issue of blobs and config for the dir transport
by removing the .tar extension
Signed-off-by: umohnani8 <umohnani@redhat.com>
Closes: #489
Approved by: rhatdan
This fixes a large SELinux bug. Currently if you do the following
commands
ctr=$(buildah from scratch)
mnt=$(buildah mount $ctr)
dnf install --installroot=$mnt httpd
buildah run $ctr touch /test
The last command fails. The reason for this is the SELinux labels are getting applied
to the mount point, since it was not being mounted as an overlay file system.
Containers/storage was updated to always mount an overlay even if the lower layer is empty
This then causes the mount point to use a context mount, and changes dnf to not apply
labels. This change then allows buildah run to create confined containers to run code.
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Closes: #486
Approved by: TomSweeneyRedHat
This is an initial attempt at bringing in the ginkgo test framework into
buildah. The inspect bats file was also imported.
Signed-off-by: baude <bbaude@redhat.com>
Closes: #472
Approved by: rhatdan
Avoid opening the file in write mode if we are not going to write
anything.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Closes: #487
Approved by: rhatdan
vendor in profiles from github.com/docker/docker/profiles to support seccomp.
vendor in latest runtime-tools to support bind mounting.
Signed-off-by: umohnani8 <umohnani@redhat.com>
Closes: #477
Approved by: rhatdan
Current link is broken.
This commit corrects the link to point at the
correct file.
Signed-off-by: Michael Gugino <mgugino@redhat.com>
Closes: #480
Approved by: nalind
When populating a container from a container image with a
volume directory, we need to copy the content of the source
directory into the target. The code was mistakenly looking
for a file not a directory.
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Closes: #471
Approved by: nalind
Figured that these options need to be in from and bud instead.
Removed the options from the documentation of run and bud for now.
Signed-off-by: umohnani8 <umohnani@redhat.com>
Closes: #470
Approved by: rhatdan
You have to be root to run buildah. This commit adds a notice to the
buildah(1) man-page and improves the front-page README.md a bit so that
this is more obvious to the user.
Fixes issue #420.
Signed-off-by: Benjamin Kircher <benjamin.kircher@gmail.com>
Closes: #462
Approved by: rhatdan
For COPR builds, we will use a a slightly modified spec and the
makesrpm method over SCM builds so we can have dynamic package
names.
Signed-off-by: baude <bbaude@redhat.com>
Closes: #460
Approved by: rhatdan
A patch got merged into containers/storage that makes sure SELinux labels
are appliced when committing to storage. This prevents a failure condition
which arrises from leaked mount points between the time a container is mounted
and it is committed.
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Closes: #453
Approved by: TomSweeneyRedHat
We were interpreting the ignoreUnrecognizedInstructions incorrectly, so
fix that, and call out the unrecognized instruction keyword in the error
message (or debug message, if we're ignoring it).
Should fix#451.
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
Closes: #452
Approved by: rhatdan
--add-host
--cgroup-parent
--cpu-period
--cpu-quota
--cpu-shares
--cpuset-mems
--memory
--memory-swap
--security-opt
--ulimit
These flags are going to be used by buildah run and bud.
The implementation will follow in another PR.
Signed-off-by: umohnani8 <umohnani@redhat.com>
When we encounter the MAINTAINER keyword in a Dockerfile, imagebuilder
updates the Author field in the imagebuilder.Builder structure. Pick up
that value when we go to commit the image.
Should fix#448.
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
Closes: #450
Approved by: rhatdan
When setting a container name the getImageName function goes through
all the names of the resolved image and finds the name that contains
the given name by the user.
However, if the user is specifying "docker.io/tagged-image"
the Docker transport returns "docker.io/library/tagged-image" which
makes getImageName returns the original image name because it does
not find a match.
To resolve this issue before calling getImageName the image given
by the user will be trimmed to be just the name.
Signed-off-by: Boaz Shuster <ripcurld.github@gmail.com>
Closes: #422
Approved by: rhatdan
No new line was returned when using the --format flag for buildah
inspect.
Signed-off-by: umohnani8 <umohnani@redhat.com>
Closes: #442
Approved by: rhatdan
buildah containers now supports oretty-printing using a Go template
with the --format flag. And output can be filtered based on id, name, or
ancestor.
Signed-off-by: umohnani8 <umohnani@redhat.com>
Closes: #437
Approved by: rhatdan
Allows rmi to remove all dangling images (images without a tag and without a child image)
Add new test case
Signed-off-by: Arthur Mello <amello@redhat.com>
Closes: #418
Approved by: rhatdan
The --runtime-flag flag for buildah run and bud would fail
whenever the global flags of the runtime were passed to it.
Changed it to accept the format [global-flag]=[value] where
global-flag would be converted to --[global-flag] in the code.
Signed-off-by: umohnani8 <umohnani@redhat.com>
Closes: #431
Approved by: rhatdan
quiet was overriding format, but we want format to override quiet
if both the flags are set for buildah images.
Changed it so that it errors out if both quiet and format are set.
Signed-off-by: umohnani8 <umohnani@redhat.com>
Closes: #426
Approved by: rhatdan
By default, the JSON encoder from the Go standard library
escapes the HTML characters which causes the maintainer output
looks strange:
"maintainer": "NGINX Docker Maintainers \u003cdocker-maint@nginx.com\u003e"
Instead of:
"maintainer": "NGINX Docker Maintainers <docker-maint@nginx.com>"
This patch fixes this issue in "buildah-inspect" only as this is
the only place that such characters are displayed.
Note: if the output of "buildah-inspect" is piped or redirected
then the HTML characters are not escaped.
Signed-off-by: Boaz Shuster <ripcurld.github@gmail.com>
Closes: #421
Approved by: rhatdan