{"action":"created","issue":{"url":"https://api.github.com/repos/docker/swarm/issues/1390","labels_url":"https://api.github.com/repos/docker/swarm/issues/1390/labels{/name}","comments_url":"https://api.github.com/repos/docker/swarm/issues/1390/comments","events_url":"https://api.github.com/repos/docker/swarm/issues/1390/events","html_url":"https://github.com/docker/swarm/issues/1390","id":115901810,"number":1390,"title":"Swarm Docker Run Proxy Issue ","user":{"login":"stemau98","id":14998179,"avatar_url":"https://avatars.githubusercontent.com/u/14998179?v=3","gravatar_id":"","url":"https://api.github.com/users/stemau98","html_url":"https://github.com/stemau98","followers_url":"https://api.github.com/users/stemau98/followers","following_url":"https://api.github.com/users/stemau98/following{/other_user}","gists_url":"https://api.github.com/users/stemau98/gists{/gist_id}","starred_url":"https://api.github.com/users/stemau98/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stemau98/subscriptions","organizations_url":"https://api.github.com/users/stemau98/orgs","repos_url":"https://api.github.com/users/stemau98/repos","events_url":"https://api.github.com/users/stemau98/events{/privacy}","received_events_url":"https://api.github.com/users/stemau98/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-11-09T15:37:34Z","updated_at":"2015-11-13T07:52:51Z","closed_at":null,"body":"Hey!\r\n\r\nI'm working behind a company proxy and trying to run a docker swarm cluster. \r\nI am able to join and manage a cluster but when it comes to starting a container with docker run I get a html response from the proxy server with error code 502.\r\n\r\nProxy settings for docker work fine.\r\n\r\nAll other commands within the swarm cluster like ps, pull, etc. worked also fine, only the run command failed."},"comment":{"url":"https://api.github.com/repos/docker/swarm/issues/comments/156356550","html_url":"https://github.com/docker/swarm/issues/1390#issuecomment-156356550","issue_url":"https://api.github.com/repos/docker/swarm/issues/1390","id":156356550,"user":{"login":"kunalkushwaha","id":2758433,"avatar_url":"https://avatars.githubusercontent.com/u/2758433?v=3","gravatar_id":"","url":"https://api.github.com/users/kunalkushwaha","html_url":"https://github.com/kunalkushwaha","followers_url":"https://api.github.com/users/kunalkushwaha/followers","following_url":"https://api.github.com/users/kunalkushwaha/following{/other_user}","gists_url":"https://api.github.com/users/kunalkushwaha/gists{/gist_id}","starred_url":"https://api.github.com/users/kunalkushwaha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kunalkushwaha/subscriptions","organizations_url":"https://api.github.com/users/kunalkushwaha/orgs","repos_url":"https://api.github.com/users/kunalkushwaha/repos","events_url":"https://api.github.com/users/kunalkushwaha/events{/privacy}","received_events_url":"https://api.github.com/users/kunalkushwaha/received_events","type":"User","site_admin":false},"created_at":"2015-11-13T07:52:51Z","updated_at":"2015-11-13T07:52:51Z","body":">The strange thing is that only the docker run command which points to my swarm cluster get an error > response. All other commands like info or pull are working.\r\n\r\ndocker command on host utilizes the proxy of you docker host settings, while in case of ``docker run `` your container, will utilize the proxy which is set in your environment settings for container i.e. passed as ``-e`` while docker run.\r\n\r\nTry ``docker run -d -e \"http_proxy=http://example-proxy:port\" swarm join --addr=host-IP:swarm-port token://618194207ddfcbf6e13693d08f0dc5fc``\r\n"}}