{"action":"created","issue":{"url":"https://api.github.com/repos/bmuschko/gradle-docker-plugin/issues/40","labels_url":"https://api.github.com/repos/bmuschko/gradle-docker-plugin/issues/40/labels{/name}","comments_url":"https://api.github.com/repos/bmuschko/gradle-docker-plugin/issues/40/comments","events_url":"https://api.github.com/repos/bmuschko/gradle-docker-plugin/issues/40/events","html_url":"https://github.com/bmuschko/gradle-docker-plugin/issues/40","id":63686590,"number":40,"title":"DockerCreateContainer task in gradle","user":{"login":"maverickuser","id":6060996,"avatar_url":"https://avatars.githubusercontent.com/u/6060996?v=3","gravatar_id":"","url":"https://api.github.com/users/maverickuser","html_url":"https://github.com/maverickuser","followers_url":"https://api.github.com/users/maverickuser/followers","following_url":"https://api.github.com/users/maverickuser/following{/other_user}","gists_url":"https://api.github.com/users/maverickuser/gists{/gist_id}","starred_url":"https://api.github.com/users/maverickuser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maverickuser/subscriptions","organizations_url":"https://api.github.com/users/maverickuser/orgs","repos_url":"https://api.github.com/users/maverickuser/repos","events_url":"https://api.github.com/users/maverickuser/events{/privacy}","received_events_url":"https://api.github.com/users/maverickuser/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2015-03-23T10:16:47Z","updated_at":"2015-03-24T15:03:47Z","closed_at":null,"body":"I have added the DockerCreateContainer task and want to run a image.\r\nSomething like this\r\ndocker run -d -p 80:80 -p 8125:8125/udp -p 8126:8126 --name kamon-grafana-dashboard kamon/grafana_graphite\r\n\r\nadded task in gradle script \r\ntask createMyAppContainer(type: DockerCreateContainer) {\r\n    targetImageId { 2124414a69ae } \r\n    exposedPorts =['80/tcp':80,'8125/udp':8125,'8126':8126]\r\n}\r\n\r\nThough as per remote API it may be\r\n    exposedPorts = {\"80/tcp\":{80},\"8125/udp\":{8125},\"8126/tcp\":{8126}}\r\n\r\ncan anyone guide /point themistake?\r\n"},"comment":{"url":"https://api.github.com/repos/bmuschko/gradle-docker-plugin/issues/comments/85542822","html_url":"https://github.com/bmuschko/gradle-docker-plugin/issues/40#issuecomment-85542822","issue_url":"https://api.github.com/repos/bmuschko/gradle-docker-plugin/issues/40","id":85542822,"user":{"login":"maverickuser","id":6060996,"avatar_url":"https://avatars.githubusercontent.com/u/6060996?v=3","gravatar_id":"","url":"https://api.github.com/users/maverickuser","html_url":"https://github.com/maverickuser","followers_url":"https://api.github.com/users/maverickuser/followers","following_url":"https://api.github.com/users/maverickuser/following{/other_user}","gists_url":"https://api.github.com/users/maverickuser/gists{/gist_id}","starred_url":"https://api.github.com/users/maverickuser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maverickuser/subscriptions","organizations_url":"https://api.github.com/users/maverickuser/orgs","repos_url":"https://api.github.com/users/maverickuser/repos","events_url":"https://api.github.com/users/maverickuser/events{/privacy}","received_events_url":"https://api.github.com/users/maverickuser/received_events","type":"User","site_admin":false},"created_at":"2015-03-24T15:03:47Z","updated_at":"2015-03-24T15:03:47Z","body":"Thanks for the info.\r\nI added the DockerStartContainer task too.But still not starteed\r\n\r\ntask createMyAppContainer(type: DockerCreateContainer) {\r\n    targetImageId {2124414a69ae} \r\n    exposedPorts =['80/tcp':80,'8125/udp':8125,'8126':8126]\r\n}\r\ntask startMyAppContainer(type: DockerStartContainer) {\r\n    dependsOn createMyAppContainer\r\n    targetContainerId { createMyAppContainer.getContainerId() }\r\n}"}}