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
dind container setup for integration tests #212
Conversation
@sbespalov/z this pull request is too small, just 1 lines changed (less than 10), there will be no formal code review, see §53 and §28; in the future, try to make sure your pull requests are not too small; @amihaiemil/z please review this and merge or reject |
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.
@sbespalov looks good, see comment! :)
@@ -11,4 +11,5 @@ script: | |||
- docker --help | |||
- dockerd --help | |||
- docker pull hello-world #for some IT cases | |||
- docker run -d --privileged -p 12375:2375 docker:dind |
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.
@sbespalov Can you shortly explain what this line does?
I assume it will start a docker instance which will listen at some port, locally. But will you be able to connect to it via TCP? That's what we need, not the default Unix Socket connection.
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.
I assume it will start a docker instance which will listen at some port, locally
yes. It was done according this comment.
But will you be able to connect to it via TCP?
seems it is available by TCP
$ sudo docker run -d --privileged -p 12375:2375 docker:dind
86189e1b63b0a87fbb83ca543830bdae9c5ef71ff066f47ec7bb39387cec713e
$ sudo docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
86189e1b63b0 docker:dind "dockerd-entrypoint.…" 7 seconds ago Up 4 seconds 0.0.0.0:12375->2375/tcp compassionate_noether
$ telnet localhost 12375
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
]
HTTP/1.1 400 Bad Request
Content-Type: text/plain; charset=utf-8
Connection: close
400 Bad RequestConnection closed by foreign host.
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.
@sbespalov Can you please also give the container a name and stop it after the tests?
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.
@bkuzmic We don't need to start any container, only to have a Docker running, that we can connect to from the tests and play around :) I mean, even if the command starts a container, it's not important.
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.
@amihaiemil The "docker run" command starts the container. Which means that we need to stop it too after the mvn command. We will not be able to start another container unless each time a new environment is created.
@sbespalov Many thanks! :) |
@rultor merge it |
@amihaiemil OK, I'll try to merge now. You can check the progress of the merge here |
@amihaiemil Done! FYI, the full log is here (took me 2min) |
Job |
This job is not in scope |
#197