{"action":"created","issue":{"url":"https://api.github.com/repos/testcontainers/testcontainers-java/issues/619","repository_url":"https://api.github.com/repos/testcontainers/testcontainers-java","labels_url":"https://api.github.com/repos/testcontainers/testcontainers-java/issues/619/labels{/name}","comments_url":"https://api.github.com/repos/testcontainers/testcontainers-java/issues/619/comments","events_url":"https://api.github.com/repos/testcontainers/testcontainers-java/issues/619/events","html_url":"https://github.com/testcontainers/testcontainers-java/pull/619","id":307838384,"number":619,"title":"getServicePort on DockerComposeContainer throws NullPointerException if service instance number in not used.","user":{"login":"barrycommins","id":19176452,"avatar_url":"https://avatars2.githubusercontent.com/u/19176452?v=4","gravatar_id":"","url":"https://api.github.com/users/barrycommins","html_url":"https://github.com/barrycommins","followers_url":"https://api.github.com/users/barrycommins/followers","following_url":"https://api.github.com/users/barrycommins/following{/other_user}","gists_url":"https://api.github.com/users/barrycommins/gists{/gist_id}","starred_url":"https://api.github.com/users/barrycommins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/barrycommins/subscriptions","organizations_url":"https://api.github.com/users/barrycommins/orgs","repos_url":"https://api.github.com/users/barrycommins/repos","events_url":"https://api.github.com/users/barrycommins/events{/privacy}","received_events_url":"https://api.github.com/users/barrycommins/received_events","type":"User","site_admin":false},"labels":[{"id":393754416,"url":"https://api.github.com/repos/testcontainers/testcontainers-java/labels/area/docker-compose","name":"area/docker-compose","color":"f9d0c4","default":false},{"id":198678879,"url":"https://api.github.com/repos/testcontainers/testcontainers-java/labels/type/bug","name":"type/bug","color":"d4c5f9","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/testcontainers/testcontainers-java/milestones/31","html_url":"https://github.com/testcontainers/testcontainers-java/milestone/31","labels_url":"https://api.github.com/repos/testcontainers/testcontainers-java/milestones/31/labels","id":3071410,"number":31,"title":"next","description":"","creator":{"login":"bsideup","id":1050762,"avatar_url":"https://avatars3.githubusercontent.com/u/1050762?v=4","gravatar_id":"","url":"https://api.github.com/users/bsideup","html_url":"https://github.com/bsideup","followers_url":"https://api.github.com/users/bsideup/followers","following_url":"https://api.github.com/users/bsideup/following{/other_user}","gists_url":"https://api.github.com/users/bsideup/gists{/gist_id}","starred_url":"https://api.github.com/users/bsideup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bsideup/subscriptions","organizations_url":"https://api.github.com/users/bsideup/orgs","repos_url":"https://api.github.com/users/bsideup/repos","events_url":"https://api.github.com/users/bsideup/events{/privacy}","received_events_url":"https://api.github.com/users/bsideup/received_events","type":"User","site_admin":false},"open_issues":8,"closed_issues":13,"state":"open","created_at":"2018-01-29T13:15:22Z","updated_at":"2018-03-23T07:10:47Z","due_on":null,"closed_at":null},"comments":0,"created_at":"2018-03-22T22:32:55Z","updated_at":"2018-03-23T07:13:12Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/testcontainers/testcontainers-java/pulls/619","html_url":"https://github.com/testcontainers/testcontainers-java/pull/619","diff_url":"https://github.com/testcontainers/testcontainers-java/pull/619.diff","patch_url":"https://github.com/testcontainers/testcontainers-java/pull/619.patch"},"body":"This is quite a minor one, but maybe worth fixing for consistency.\r\n\r\nIt is possible to expose a service in `DockerComposeContainer` without specifying the instance number:\r\n\r\n```java\r\nnew DockerComposeContainer(new File(\"src/test/resources/compose-test.yml\"))\r\n        .withExposedService(\"redis\", 6379)\r\n```\r\n\r\nbut when you then call `getServicePort(\"redis\", 6379)`, a `NullPointerException` is thrown.\r\n\r\nIt works ok with `getServicePort(\"redis_1\", 6379)`\r\n"},"comment":{"url":"https://api.github.com/repos/testcontainers/testcontainers-java/issues/comments/375564529","html_url":"https://github.com/testcontainers/testcontainers-java/pull/619#issuecomment-375564529","issue_url":"https://api.github.com/repos/testcontainers/testcontainers-java/issues/619","id":375564529,"user":{"login":"bsideup","id":1050762,"avatar_url":"https://avatars3.githubusercontent.com/u/1050762?v=4","gravatar_id":"","url":"https://api.github.com/users/bsideup","html_url":"https://github.com/bsideup","followers_url":"https://api.github.com/users/bsideup/followers","following_url":"https://api.github.com/users/bsideup/following{/other_user}","gists_url":"https://api.github.com/users/bsideup/gists{/gist_id}","starred_url":"https://api.github.com/users/bsideup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bsideup/subscriptions","organizations_url":"https://api.github.com/users/bsideup/orgs","repos_url":"https://api.github.com/users/bsideup/repos","events_url":"https://api.github.com/users/bsideup/events{/privacy}","received_events_url":"https://api.github.com/users/bsideup/received_events","type":"User","site_admin":false},"created_at":"2018-03-23T07:13:12Z","updated_at":"2018-03-23T07:13:12Z","author_association":"MEMBER","body":"@barrycommins nice! Was planning to do exactly that :D Thanks for contributing it :)"}}
{"actor":{"display_login":"bsideup"}}