Skip to content
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

Merged
merged 1 commit into from Dec 11, 2018

Conversation

sbespalov
Copy link
Contributor

@coveralls
Copy link

coveralls commented Dec 11, 2018

Pull Request Test Coverage Report for Build 366

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 85.237%

Totals Coverage Status
Change from base Build 362: 0.0%
Covered Lines: 485
Relevant Lines: 569

💛 - Coveralls

@0crat
Copy link
Collaborator

0crat commented Dec 11, 2018

@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

Copy link
Owner

@amihaiemil amihaiemil left a 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
Copy link
Owner

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.

Copy link
Contributor Author

@sbespalov sbespalov Dec 11, 2018

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.

Copy link
Contributor

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?

Copy link
Owner

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.

Copy link
Contributor

@bkuzmic bkuzmic Dec 11, 2018

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.

@amihaiemil
Copy link
Owner

@sbespalov Many thanks! :)

@amihaiemil
Copy link
Owner

@rultor merge it

@rultor
Copy link
Collaborator

rultor commented Dec 11, 2018

@rultor merge it

@amihaiemil OK, I'll try to merge now. You can check the progress of the merge here

@rultor rultor merged commit 047a38a into amihaiemil:master Dec 11, 2018
@rultor
Copy link
Collaborator

rultor commented Dec 11, 2018

@rultor merge it

@amihaiemil Done! FYI, the full log is here (took me 2min)

@0crat
Copy link
Collaborator

0crat commented Dec 11, 2018

Job gh:amihaiemil/docker-java-api#212 is not assigned, can't get performer

@0crat
Copy link
Collaborator

0crat commented Dec 11, 2018

This job is not in scope

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants