-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Allow pulling from HTTP registries when using the docker compat API #16486
Comments
@vrothberg PTAL |
@SoMuchForSubtlety is it possible to add A drop-in |
That doesn't work, because the registry starts with a random port for each test case. I tried to change the tests to use a fixed port, but there were concerns that that would break the tests in some environments. Dropping the requirement for a subdomain wildcard when specifying a prefix without a location seems like the kost straightforward solution to me. |
@SoMuchForSubtlety, the idea is to generate the file when running the tests, when we know which port the registry is running on.
It will take time some more time until we get it done. |
They won't allow any changes to existing tests.
I'll try to write a small external program that checks for running registries and updates the config accordingly. Btw, I'd be happy to contribute the required changes for the prefix logic. |
Thanks, @SoMuchForSubtlety! Let's continue the design discussion in #16491. Once we have consensus, we can distribute the work. Maybe we can find a less time-consuming solution. |
I took another look at this issue. The following configuration does the trick. Prefix-matching matches at the host boundary such that [[registry]]
prefix = "localhost"
location = "localhost"
insecure = true The caveat. This is not documented and code comment suggests to not rely on this behavior. However, this behavior is so old that I'd be afraid to change it. @mtrmac WDYT? |
@vrothberg in short, I don’t know. Ugh, clearly I should have actually implemented that correctly the first time. In one sense, it has a unit test, so right now, for a user using a frozen version of Podman, I think it works well enough to rely on. In another sense, fixing this has just become 5 times more urgent… but you’re right that changing this now might be too much of a risk. |
Do I understand it correctly that a "bug" has turned into a feature? 👼 Before making a recommendation, I want to make sure that this doesn't break in the future. |
A friendly reminder that this issue had no activity for 30 days. |
@mtrmac @vrothberg what should we do with this one? |
I'd recommend the upper mentioned configuration of registries.conf: [[registry]]
prefix = "localhost"
location = "localhost"
insecure = true While a code comment suggests this may change in the future, I think the ship has sailed already. |
A friendly reminder that this issue had no activity for 30 days. |
containers#16486 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Since we have a workaround can we close this issue? Should this use case be documented in a man page? |
I think we need to document the workaround in the podman man pages. Probably in the |
Yes please! I just lost an hour putting this all together and landing here. Probably off-topic here, but the docs at https://podman-desktop.io/docs/getting-started/insecure-registry are not up2date either. The example there is in v1 format, which does not work any longer. |
Hi! I came across this issue while trying to debug an issue with an insecure registry behind a proxy. I noticed that, even with the workaround in place, From my registries.conf:
We can see that trying to pull will still try an HTTPS request first, which will fail:
Is there a way to truly get Podman to only try pulling via HTTP? I ask this for a few reasons:
I guess it isn't technically unexpected behavior, since the
Given the above, I'm not sure if this belongs on this issue, or should be a separate issue or feature request (e.g., implement a way to force HTTP). Thanks! |
There is no way at the moment. Podman will always attempt HTTPS first and if the registry is set "insecure" Podman will fallback to trying HTTP.
I agree. It's a somehow related but independent issue. I will break this out into a new one. |
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
I'm trying to add podman support to the testcontainers-java library (see testcontainers/testcontainers-java#6158). Many of their tests rely on a local, non-https registry to test image pulling behaviour. Podman does not allow this, and there is no straightforward workaround.
To be 100% compatible with the docker API, podman should allow pulling from HTTP container registries when being called via the docker API.
Steps to reproduce the issue:
Describe the results you received:
Describe the results you expected:
No error.
Additional information you deem important (e.g. issue happens only occasionally):
Modifying the tests for testcontainers-java is sadly not an option
Output of
podman version
:Output of
podman info
:Package info (e.g. output of
rpm -q podman
orapt list podman
orbrew info podman
):Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (https://github.com/containers/podman/blob/main/troubleshooting.md)
Yes
The text was updated successfully, but these errors were encountered: