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
In commit 47ac96155f the image name that is used
for setting the container name is taken from the resolved image
unless it is empty.
The image has the "Names" field and right now the first name is
taken. However, when the image is a tagged image, the container name
will end up using the original name instead of the given one.
For example:
$ buildah tag busybox busybox1
$ buildah from busybox1
Will set the name of the container as "busybox-working-container"
while it was expected to be "busybox1-working-container".
This patch fixes this particular issue.
Signed-off-by: Boaz Shuster <ripcurld.github@gmail.com>
Closes: #399
Approved by: rhatdan
During the creation of a new builder object there are errors
that are only logged into "logrus.Debugf".
If in the end of the process "ref" or "img" are nil and "options.FromImage"
is set then it means that there was an issue.
By default, it was assumed that the image name is wrong. Yet,
this assumption isn't always correct. For example, it might fail due to
authorization or connection errors.
In this patch, I am attempting to fix this problem by checking the
last error stored in the "err" variable and returning the cause
of the failure.
Signed-off-by: Boaz Shuster <ripcurld.github@gmail.com>
Closes: #406
Approved by: rhatdan
This change gives a better error message when the commit fails
because of bad authentication.
Signed-off-by: Boaz Shuster <ripcurld.github@gmail.com>
Closes: #385
Approved by: rhatdan