{"action":"reopened","issue":{"url":"https://api.github.com/repos/docker-java/docker-java/issues/1266","repository_url":"https://api.github.com/repos/docker-java/docker-java","labels_url":"https://api.github.com/repos/docker-java/docker-java/issues/1266/labels{/name}","comments_url":"https://api.github.com/repos/docker-java/docker-java/issues/1266/comments","events_url":"https://api.github.com/repos/docker-java/docker-java/issues/1266/events","html_url":"https://github.com/docker-java/docker-java/issues/1266","id":512878784,"node_id":"MDU6SXNzdWU1MTI4Nzg3ODQ=","number":1266,"title":"Question about running with -it","user":{"login":"UnfamousThomas","id":31453763,"node_id":"MDQ6VXNlcjMxNDUzNzYz","avatar_url":"https://avatars1.githubusercontent.com/u/31453763?v=4","gravatar_id":"","url":"https://api.github.com/users/UnfamousThomas","html_url":"https://github.com/UnfamousThomas","followers_url":"https://api.github.com/users/UnfamousThomas/followers","following_url":"https://api.github.com/users/UnfamousThomas/following{/other_user}","gists_url":"https://api.github.com/users/UnfamousThomas/gists{/gist_id}","starred_url":"https://api.github.com/users/UnfamousThomas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/UnfamousThomas/subscriptions","organizations_url":"https://api.github.com/users/UnfamousThomas/orgs","repos_url":"https://api.github.com/users/UnfamousThomas/repos","events_url":"https://api.github.com/users/UnfamousThomas/events{/privacy}","received_events_url":"https://api.github.com/users/UnfamousThomas/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2019-10-26T20:01:02Z","updated_at":"2019-11-03T20:45:48Z","closed_at":null,"author_association":"NONE","body":"Hello. I am trying to start a container with -it and then attach to it.\r\n\r\nI figured .withTty would work but that does not seem to be the case.\r\nI am using this command: `docker run -d -it --network bungee --name lobby localhost:5000/release-lobby` to run the container, and when I do docker attach it displays the console. However, using the api:\r\n\r\n> DockerClientConfig config = DefaultDockerClientConfig.createDefaultConfigBuilder().withRegistryUrl(\"localhost:5000\").build();\r\n>         DockerClient dockerClient = DockerClientBuilder.getInstance(config)\r\n>                 .build();\r\n>         CreateContainerResponse container = dockerClient.createContainerCmd(image)\r\n>                 .withHostConfig((new HostConfig())\r\n>                .withNetworkMode(\"bungee\"))\r\n>                 .withTty(true)\r\n>                 .withName(\"lobby1\")\r\n>                 .withImage(\"localhost:5000/release-lobby\")\r\n>                 .exec();\r\n>         dockerClient.startContainerCmd(container.getId()).exec();\r\n\r\nIt creates the container, however when attached to it, does not display the console.\r\n\r\n\r\nAny tips?"}}
{"actor":{"display_login":"UnfamousThomas"}}