-
-
Notifications
You must be signed in to change notification settings - Fork 290
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
Getting docker login error when creating container from local image #183
Comments
@paulvanbladel Could you add the error message? Let me see if I can recreate the issue. What is the base image of |
No access to PC right now, but the error message is about docker login. |
I did some local tests and had no issues. Is your Docker base image based on Windows? In this case This was my local test: var imageFromDockerfile = await new ImageFromDockerfileBuilder()
.WithName("alpine:custom")
.WithDockerfile("Dockerfile")
.WithDockerfileDirectory(".")
.WithDeleteIfExists(true)
.Build();
var testcontainersBuilder = new TestcontainersBuilder<TestcontainersContainer>()
.WithImage(imageFromDockerfile);
using (var testcontainer = testcontainersBuilder.Build())
{
await testcontainer.StartAsync();
} I can only imagine that the image does not exist locally and must be pulled from a Docker registry that it not authenticated. Until now, |
No it's a Linux based image, but I am running it on Windows 10. |
I don't think changing the host system will solve the problem (if it exists). Unix and Windows should not behave differently in this case. |
Hi André,
Note that on the same dev machine following works like a charm:
My docker file is:
But I'm wondering if the dockerfile is really relevant since I'm trying to create a container from an image which has been created already based on the docker file? I tried also to use directly the docker dotnet package that you are using internally and that works also:
I'll try to do some more debugging to find the problem. |
@HofmeisterAn |
I just rechecked the code. I also discovered the reason for the problem. In version I changed this behavior in beta version 1.1.0 to the correct property I'll release a new version later this day. |
@HofmeisterAn |
No worries. Symbols are included and I also publish a Do I need anything else? |
I will check and keep you posted. |
@HofmeisterAn |
Ok, thanks. I'll check that. |
@paulvanbladel Package is now part of the project. |
I have a regular docker image build locally with docker (i'm using docker on windows 10).
So, following works perfect:y:
If I want to create now a container from the image with dotnet-testcontainers
I get
Any idea?
Note that creating a container from an image on docker hub (eg nginx) works as expected.
I'm not expecting that i need to login because I'm not pulling the image from a remote nor local docker repo, just from the local images.
The text was updated successfully, but these errors were encountered: