-
-
Notifications
You must be signed in to change notification settings - Fork 492
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
Cannot create a container with more than one network requested #248
Comments
ikolomiyets
added a commit
to ikolomiyets/testcontainers-go
that referenced
this issue
Sep 23, 2020
…ith more than one network specified in the request.
This was referenced Mar 12, 2021
Merged
Closed
Closed
This was referenced Mar 15, 2021
I think this was resolved in #249. Closing |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Docker Provider fails to create a container when ContainerRequest has more than one network specified.
To Reproduce
Consider container request like the following:
amqpRequest := testcontainers.ContainerRequest{ Image: "nginx", Name: "nginx-test", ExposedPorts: []string{"80/tcp"}, Env: env, AutoRemove: true, WaitingFor: hp, Networks: []string{"network1", "network2"}, }
When executed the response from the docker is "Error response from daemon: Container cannot be connected to network endpoints: network1, network2" (assuming that both networks exist).
Expected behavior
Container created.
** docker info **
output of the command:
Additional context
It appears that Docker does not allow more than one network to be specified during CreateContainer call. Instead, if more than one network specified then CreateContainer should be called with only one network out of the requested list. Then, NetworkConnect should be called for the remaining networks.
The text was updated successfully, but these errors were encountered: