-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
[Bug]: cannot push to the docker registry started in testcontainers #9345
Comments
And one more thing I forgot to mention: registry's catalog is actually available via http:
|
Okay, I was not very clear. I know I can override the version, but it should not be done in most cases. Spring docs that you mentioned warns about this:
|
I've just tried to set the latest testcontainers version explicitly in
The result and errors are the same, I cannot push to the registry started in testcontainers. |
were you able to find a solution to this issue? I'm also facing the same |
no, I haven't found a solution |
Module
Core
Testcontainers version
1.19.8
Using the latest Testcontainers version?
No
Host OS
MacOS Sonoma 14.6.1
Host Arch
Tried both x86 and ARM
Docker version
Client:
Cloud integration: v1.0.35+desktop.13
Version: 26.0.0
API version: 1.45
Go version: go1.21.8
Git commit: 2ae903e
Built: Wed Mar 20 15:14:46 2024
OS/Arch: darwin/arm64
Context: desktop-linux
Server: Docker Desktop 4.29.0 (145265)
Engine:
Version: 26.0.0
API version: 1.45 (minimum version 1.24)
Go version: go1.21.8
Git commit: 8b79278
Built: Wed Mar 20 15:18:02 2024
OS/Arch: linux/arm64
Experimental: false
containerd:
Version: 1.6.28
GitCommit: ae07eda36dd25f8a1b98dfbf587313b99c0190bb
runc:
Version: 1.1.12
GitCommit: v1.1.12-0-g51d5e94
docker-init:
Version: 0.19.0
GitCommit: de40ad0
What happened?
I'm building a service with spring boot 3 that talks to k8s API using fabric8 java client. So, I want to run full integration tests without any mocks, including k8s cluster. To start k8s in tests I'm using k3s-testcontainers. It starts fine, but then I need a custom registry for k3s to pull my private images from during tests. So I thought I can start a docker registry in testcontainers for this.
The registry starts fine in testcontainers, but I cannot push anything to it. Neither in the code, nor through docker cli when the test is paused in the debug mode. I prepared a minimal demo to reproduce the issue: https://github.com/pfilaretov42/spring-testcontainers-registry
Here is how to reproduce the issue using my repository above:
TestcontainersTest
class, on"set breakpoint here"
line.TestcontainersTest.test()
(e.g. in IntelliJ IDEA)57025
:docker ps | grep registry
As you can see I tried different host names (
localhost
,127.0.0.1
,0.0.0.0
) but nothing works.And here is how it works with plain docker cli, i.e. no testcontainers:
Relevant log output
No response
Additional Information
I cannot use the latest version of testcontainers since the version is defined by the spring boot starter
org.springframework.boot:spring-boot-testcontainers
.The text was updated successfully, but these errors were encountered: