-
Notifications
You must be signed in to change notification settings - Fork 219
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a flag to build the image from a file #1469
base: main
Are you sure you want to change the base?
Conversation
e591106
to
432e23b
Compare
Build failed. ✔️ unit-test SUCCESS in 5m 00s |
Would be nice to know how this error wasn't caught by building it locally, but whatever. |
Build failed. ✔️ unit-test SUCCESS in 4m 52s |
Ok, I have no idea what the problem with this error is. It's calling "podman images" that fails, but it works on my machine for some reason. |
Build failed. ✔️ unit-test SUCCESS in 4m 48s |
198e92a
to
c3abf1d
Compare
Build failed. ✔️ unit-test SUCCESS in 4m 55s |
c3abf1d
to
4dd2a28
Compare
Build failed. ✔️ unit-test SUCCESS in 5m 14s |
4dd2a28
to
02e04b9
Compare
Build failed. ✔️ unit-test SUCCESS in 5m 05s |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow, thanks for picking this up again.
One quick question: other than the discussion on the original issue, did you see the discussion on the previously attempted pull request?
Yes, I did. On the one hand, yes, filesystems are racy and one could ofc guard against stuff. On the other hand, one just passed a path to the directory with the Containerfile in and guarding against it can be quite annoying. So, we get a few questions:
Personally I don't think dealing with that is worth it. But ofc if you want that, I would implement it. |
On a different note, could it be that podman can't pull something in the tests? Because that would explain the failures... |
I think I finally figured out what fails. To be exact, podman outputs at step 6 ( @debarshiray Do you have an idea about how to fix this? I am not really well versed when it comes to SELinux. |
uses the given path as the build context forwarded to podman build afterwards it extracts the name of the image and sets it to satisfy other assumption in existing code the test builds a Fedora 39 toolbx and checks if the image is successfully tagged as localhost/fedora-toolbox Signed-off-by: Kilian Hanich <khanich.opensource@gmx.de>
Signed-off-by: Kilian Hanich <khanich.opensource@gmx.de>
tags the built image of --build by forwarding the value to --tag of podman build added a test case with and without a repository registry.fedoraproject.org was choosen as repository because podman doesn't let one chose arbitrarily Signed-off-by: Kilian Hanich <khanich.opensource@gmx.de>
Signed-off-by: Kilian Hanich <khanich.opensource@gmx.de>
Signed-off-by: Kilian Hanich <khanich.opensource@gmx.de>
54619ba
to
b4b3b84
Compare
Build failed. ✔️ unit-test SUCCESS in 7m 00s |
image to build in the tests is also moved to Fedora 38 as the Fedora 39 file doesn't work at the time of writing Signed-off-by: Kilian Hanich <khanich.opensource@gmx.de>
b4b3b84
to
b56a4cc
Compare
Don't approve of it yet, please. |
Build failed. ✔️ unit-test SUCCESS in 6m 56s |
Ok, so, there is still one problem here with the build pipeline: Since bats create a temporary image repository under a tmpdir which are labeled with e.g. I tried to locally fix this by running This implementation so far works with the default placement of the images and with SELinux in permissive mode. But I am unsure where to go from here. I also tested this by creating a VM and set So, the remaining issue is one with the pipeline and I don't know how to proceed with that. @debarshiray, do you have an idea? |
Hello,
this PR is about #1397. It adds two flags:
--build
to specify a build-context which is then passed topodman build
--build-tag
to optionally specify how the built image should be named; it passes the argument topodman build --tag
I changed the files under doc to reflect the changed and added a few bats test cases.
I can add more if these are wanted, but I currently don't think more are needed for this feature.