{"action":"closed","number":1384,"pull_request":{"url":"https://api.github.com/repos/docker/swarm/pulls/1384","id":49900183,"html_url":"https://github.com/docker/swarm/pull/1384","diff_url":"https://github.com/docker/swarm/pull/1384.diff","patch_url":"https://github.com/docker/swarm/pull/1384.patch","issue_url":"https://api.github.com/repos/docker/swarm/issues/1384","number":1384,"state":"closed","locked":false,"title":"Add token pass-thru for Authconfig","user":{"login":"dhiltgen","id":4033016,"avatar_url":"https://avatars.githubusercontent.com/u/4033016?v=3","gravatar_id":"","url":"https://api.github.com/users/dhiltgen","html_url":"https://github.com/dhiltgen","followers_url":"https://api.github.com/users/dhiltgen/followers","following_url":"https://api.github.com/users/dhiltgen/following{/other_user}","gists_url":"https://api.github.com/users/dhiltgen/gists{/gist_id}","starred_url":"https://api.github.com/users/dhiltgen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhiltgen/subscriptions","organizations_url":"https://api.github.com/users/dhiltgen/orgs","repos_url":"https://api.github.com/users/dhiltgen/repos","events_url":"https://api.github.com/users/dhiltgen/events{/privacy}","received_events_url":"https://api.github.com/users/dhiltgen/received_events","type":"User","site_admin":false},"body":"Add token pass-thru for Authconfig\r\n    \r\nThis augments the CreateContainer call to detect the AuthConfig header\r\nand use any supplied auth for pull operations.  This will allow pulling\r\nof protected image on to specific node during the create operation.\r\n    \r\nCLI usage example using username/password:\r\n\r\n    # Calculate the header\r\n    REPO_USER=yourusername\r\n    read -s PASSWORD\r\n    HEADER=$(echo \"{\\\"username\\\":\\\"${REPO_USER}\\\",\\\"password\\\":\\\"${PASSWORD}\\\"}\"|base64 -w 0 )\r\n    unset PASSWORD\r\n    echo HEADER=$HEADER\r\n\r\n    # Then add the following to your ~/.docker/config.json\r\n    \"HttpHeaders\": {\r\n        \"X-Registry-Auth\": \"<HEADER string from above>\"\r\n    }\r\n    \r\n    # Now run a private image against swarm:\r\n    docker run --rm -it yourprivateimage:latest\r\n    \r\nCLI usage example using registry tokens: (Required engine 1.10 with new auth token support)\r\n    \r\n    REPO=yourrepo/yourimage\r\n    REPO_USER=yourusername\r\n    read -s PASSWORD\r\n    AUTH_URL=https://auth.docker.io/token\r\n    TOKEN=$(curl -s -u \"${REPO_USER}:${PASSWORD}\" \"${AUTH_URL}?scope=repository:${REPO}:pull&service=registry.docker.io\" |\r\n        jq -r \".token\")\r\n    HEADER=$(echo \"{\\\"registrytoken\\\":\\\"${TOKEN}\\\"}\"|base64 -w 0 )\r\n    echo HEADER=$HEADER\r\n    \r\n    # Update the docker config as above, but the token will expire quickly...\r\n    \r\nSigned-off-by: Daniel Hiltgen <daniel.hiltgen@docker.com>\r\n","created_at":"2015-11-06T00:13:40Z","updated_at":"2015-12-14T19:22:10Z","closed_at":"2015-12-14T19:22:10Z","merged_at":"2015-12-14T19:22:10Z","merge_commit_sha":"45984a1c2d77938741c65fd4eaffaf750119ee41","assignee":{"login":"aluzzardi","id":179503,"avatar_url":"https://avatars.githubusercontent.com/u/179503?v=3","gravatar_id":"","url":"https://api.github.com/users/aluzzardi","html_url":"https://github.com/aluzzardi","followers_url":"https://api.github.com/users/aluzzardi/followers","following_url":"https://api.github.com/users/aluzzardi/following{/other_user}","gists_url":"https://api.github.com/users/aluzzardi/gists{/gist_id}","starred_url":"https://api.github.com/users/aluzzardi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aluzzardi/subscriptions","organizations_url":"https://api.github.com/users/aluzzardi/orgs","repos_url":"https://api.github.com/users/aluzzardi/repos","events_url":"https://api.github.com/users/aluzzardi/events{/privacy}","received_events_url":"https://api.github.com/users/aluzzardi/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/docker/swarm/milestones/6","html_url":"https://github.com/docker/swarm/milestones/1.1.0","labels_url":"https://api.github.com/repos/docker/swarm/milestones/6/labels","id":1383101,"number":6,"title":"1.1.0","description":"","creator":{"login":"aluzzardi","id":179503,"avatar_url":"https://avatars.githubusercontent.com/u/179503?v=3","gravatar_id":"","url":"https://api.github.com/users/aluzzardi","html_url":"https://github.com/aluzzardi","followers_url":"https://api.github.com/users/aluzzardi/followers","following_url":"https://api.github.com/users/aluzzardi/following{/other_user}","gists_url":"https://api.github.com/users/aluzzardi/gists{/gist_id}","starred_url":"https://api.github.com/users/aluzzardi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aluzzardi/subscriptions","organizations_url":"https://api.github.com/users/aluzzardi/orgs","repos_url":"https://api.github.com/users/aluzzardi/repos","events_url":"https://api.github.com/users/aluzzardi/events{/privacy}","received_events_url":"https://api.github.com/users/aluzzardi/received_events","type":"User","site_admin":false},"open_issues":42,"closed_issues":13,"state":"open","created_at":"2015-10-29T10:11:13Z","updated_at":"2015-12-14T19:22:10Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/docker/swarm/pulls/1384/commits","review_comments_url":"https://api.github.com/repos/docker/swarm/pulls/1384/comments","review_comment_url":"https://api.github.com/repos/docker/swarm/pulls/comments{/number}","comments_url":"https://api.github.com/repos/docker/swarm/issues/1384/comments","statuses_url":"https://api.github.com/repos/docker/swarm/statuses/dde577d154032fdb8bca201e44dd2261e190f796","head":{"label":"dhiltgen:token_auth","ref":"token_auth","sha":"dde577d154032fdb8bca201e44dd2261e190f796","user":{"login":"dhiltgen","id":4033016,"avatar_url":"https://avatars.githubusercontent.com/u/4033016?v=3","gravatar_id":"","url":"https://api.github.com/users/dhiltgen","html_url":"https://github.com/dhiltgen","followers_url":"https://api.github.com/users/dhiltgen/followers","following_url":"https://api.github.com/users/dhiltgen/following{/other_user}","gists_url":"https://api.github.com/users/dhiltgen/gists{/gist_id}","starred_url":"https://api.github.com/users/dhiltgen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhiltgen/subscriptions","organizations_url":"https://api.github.com/users/dhiltgen/orgs","repos_url":"https://api.github.com/users/dhiltgen/repos","events_url":"https://api.github.com/users/dhiltgen/events{/privacy}","received_events_url":"https://api.github.com/users/dhiltgen/received_events","type":"User","site_admin":false},"repo":{"id":43571759,"name":"swarm","full_name":"dhiltgen/swarm","owner":{"login":"dhiltgen","id":4033016,"avatar_url":"https://avatars.githubusercontent.com/u/4033016?v=3","gravatar_id":"","url":"https://api.github.com/users/dhiltgen","html_url":"https://github.com/dhiltgen","followers_url":"https://api.github.com/users/dhiltgen/followers","following_url":"https://api.github.com/users/dhiltgen/following{/other_user}","gists_url":"https://api.github.com/users/dhiltgen/gists{/gist_id}","starred_url":"https://api.github.com/users/dhiltgen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhiltgen/subscriptions","organizations_url":"https://api.github.com/users/dhiltgen/orgs","repos_url":"https://api.github.com/users/dhiltgen/repos","events_url":"https://api.github.com/users/dhiltgen/events{/privacy}","received_events_url":"https://api.github.com/users/dhiltgen/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dhiltgen/swarm","description":"Swarm: a Docker-native clustering system","fork":true,"url":"https://api.github.com/repos/dhiltgen/swarm","forks_url":"https://api.github.com/repos/dhiltgen/swarm/forks","keys_url":"https://api.github.com/repos/dhiltgen/swarm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dhiltgen/swarm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dhiltgen/swarm/teams","hooks_url":"https://api.github.com/repos/dhiltgen/swarm/hooks","issue_events_url":"https://api.github.com/repos/dhiltgen/swarm/issues/events{/number}","events_url":"https://api.github.com/repos/dhiltgen/swarm/events","assignees_url":"https://api.github.com/repos/dhiltgen/swarm/assignees{/user}","branches_url":"https://api.github.com/repos/dhiltgen/swarm/branches{/branch}","tags_url":"https://api.github.com/repos/dhiltgen/swarm/tags","blobs_url":"https://api.github.com/repos/dhiltgen/swarm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dhiltgen/swarm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dhiltgen/swarm/git/refs{/sha}","trees_url":"https://api.github.com/repos/dhiltgen/swarm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dhiltgen/swarm/statuses/{sha}","languages_url":"https://api.github.com/repos/dhiltgen/swarm/languages","stargazers_url":"https://api.github.com/repos/dhiltgen/swarm/stargazers","contributors_url":"https://api.github.com/repos/dhiltgen/swarm/contributors","subscribers_url":"https://api.github.com/repos/dhiltgen/swarm/subscribers","subscription_url":"https://api.github.com/repos/dhiltgen/swarm/subscription","commits_url":"https://api.github.com/repos/dhiltgen/swarm/commits{/sha}","git_commits_url":"https://api.github.com/repos/dhiltgen/swarm/git/commits{/sha}","comments_url":"https://api.github.com/repos/dhiltgen/swarm/comments{/number}","issue_comment_url":"https://api.github.com/repos/dhiltgen/swarm/issues/comments{/number}","contents_url":"https://api.github.com/repos/dhiltgen/swarm/contents/{+path}","compare_url":"https://api.github.com/repos/dhiltgen/swarm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dhiltgen/swarm/merges","archive_url":"https://api.github.com/repos/dhiltgen/swarm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dhiltgen/swarm/downloads","issues_url":"https://api.github.com/repos/dhiltgen/swarm/issues{/number}","pulls_url":"https://api.github.com/repos/dhiltgen/swarm/pulls{/number}","milestones_url":"https://api.github.com/repos/dhiltgen/swarm/milestones{/number}","notifications_url":"https://api.github.com/repos/dhiltgen/swarm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dhiltgen/swarm/labels{/name}","releases_url":"https://api.github.com/repos/dhiltgen/swarm/releases{/id}","created_at":"2015-10-02T19:19:48Z","updated_at":"2015-10-02T19:19:49Z","pushed_at":"2015-12-12T02:36:59Z","git_url":"git://github.com/dhiltgen/swarm.git","ssh_url":"git@github.com:dhiltgen/swarm.git","clone_url":"https://github.com/dhiltgen/swarm.git","svn_url":"https://github.com/dhiltgen/swarm","homepage":"","size":6976,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"docker:master","ref":"master","sha":"d3affe590404479040b225b6d2927071e0fe7894","user":{"login":"docker","id":5429470,"avatar_url":"https://avatars.githubusercontent.com/u/5429470?v=3","gravatar_id":"","url":"https://api.github.com/users/docker","html_url":"https://github.com/docker","followers_url":"https://api.github.com/users/docker/followers","following_url":"https://api.github.com/users/docker/following{/other_user}","gists_url":"https://api.github.com/users/docker/gists{/gist_id}","starred_url":"https://api.github.com/users/docker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/docker/subscriptions","organizations_url":"https://api.github.com/users/docker/orgs","repos_url":"https://api.github.com/users/docker/repos","events_url":"https://api.github.com/users/docker/events{/privacy}","received_events_url":"https://api.github.com/users/docker/received_events","type":"Organization","site_admin":false},"repo":{"id":19360616,"name":"swarm","full_name":"docker/swarm","owner":{"login":"docker","id":5429470,"avatar_url":"https://avatars.githubusercontent.com/u/5429470?v=3","gravatar_id":"","url":"https://api.github.com/users/docker","html_url":"https://github.com/docker","followers_url":"https://api.github.com/users/docker/followers","following_url":"https://api.github.com/users/docker/following{/other_user}","gists_url":"https://api.github.com/users/docker/gists{/gist_id}","starred_url":"https://api.github.com/users/docker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/docker/subscriptions","organizations_url":"https://api.github.com/users/docker/orgs","repos_url":"https://api.github.com/users/docker/repos","events_url":"https://api.github.com/users/docker/events{/privacy}","received_events_url":"https://api.github.com/users/docker/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/docker/swarm","description":"Swarm: a Docker-native clustering system","fork":false,"url":"https://api.github.com/repos/docker/swarm","forks_url":"https://api.github.com/repos/docker/swarm/forks","keys_url":"https://api.github.com/repos/docker/swarm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/docker/swarm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/docker/swarm/teams","hooks_url":"https://api.github.com/repos/docker/swarm/hooks","issue_events_url":"https://api.github.com/repos/docker/swarm/issues/events{/number}","events_url":"https://api.github.com/repos/docker/swarm/events","assignees_url":"https://api.github.com/repos/docker/swarm/assignees{/user}","branches_url":"https://api.github.com/repos/docker/swarm/branches{/branch}","tags_url":"https://api.github.com/repos/docker/swarm/tags","blobs_url":"https://api.github.com/repos/docker/swarm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/docker/swarm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/docker/swarm/git/refs{/sha}","trees_url":"https://api.github.com/repos/docker/swarm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/docker/swarm/statuses/{sha}","languages_url":"https://api.github.com/repos/docker/swarm/languages","stargazers_url":"https://api.github.com/repos/docker/swarm/stargazers","contributors_url":"https://api.github.com/repos/docker/swarm/contributors","subscribers_url":"https://api.github.com/repos/docker/swarm/subscribers","subscription_url":"https://api.github.com/repos/docker/swarm/subscription","commits_url":"https://api.github.com/repos/docker/swarm/commits{/sha}","git_commits_url":"https://api.github.com/repos/docker/swarm/git/commits{/sha}","comments_url":"https://api.github.com/repos/docker/swarm/comments{/number}","issue_comment_url":"https://api.github.com/repos/docker/swarm/issues/comments{/number}","contents_url":"https://api.github.com/repos/docker/swarm/contents/{+path}","compare_url":"https://api.github.com/repos/docker/swarm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/docker/swarm/merges","archive_url":"https://api.github.com/repos/docker/swarm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/docker/swarm/downloads","issues_url":"https://api.github.com/repos/docker/swarm/issues{/number}","pulls_url":"https://api.github.com/repos/docker/swarm/pulls{/number}","milestones_url":"https://api.github.com/repos/docker/swarm/milestones{/number}","notifications_url":"https://api.github.com/repos/docker/swarm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/docker/swarm/labels{/name}","releases_url":"https://api.github.com/repos/docker/swarm/releases{/id}","created_at":"2014-05-01T23:15:17Z","updated_at":"2015-12-14T11:26:56Z","pushed_at":"2015-12-14T19:22:10Z","git_url":"git://github.com/docker/swarm.git","ssh_url":"git@github.com:docker/swarm.git","clone_url":"https://github.com/docker/swarm.git","svn_url":"https://github.com/docker/swarm","homepage":"","size":44654,"stargazers_count":3270,"watchers_count":3270,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":520,"mirror_url":null,"open_issues_count":178,"forks":520,"open_issues":178,"watchers":3270,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/docker/swarm/pulls/1384"},"html":{"href":"https://github.com/docker/swarm/pull/1384"},"issue":{"href":"https://api.github.com/repos/docker/swarm/issues/1384"},"comments":{"href":"https://api.github.com/repos/docker/swarm/issues/1384/comments"},"review_comments":{"href":"https://api.github.com/repos/docker/swarm/pulls/1384/comments"},"review_comment":{"href":"https://api.github.com/repos/docker/swarm/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/docker/swarm/pulls/1384/commits"},"statuses":{"href":"https://api.github.com/repos/docker/swarm/statuses/dde577d154032fdb8bca201e44dd2261e190f796"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"vieux","id":1032519,"avatar_url":"https://avatars.githubusercontent.com/u/1032519?v=3","gravatar_id":"","url":"https://api.github.com/users/vieux","html_url":"https://github.com/vieux","followers_url":"https://api.github.com/users/vieux/followers","following_url":"https://api.github.com/users/vieux/following{/other_user}","gists_url":"https://api.github.com/users/vieux/gists{/gist_id}","starred_url":"https://api.github.com/users/vieux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vieux/subscriptions","organizations_url":"https://api.github.com/users/vieux/orgs","repos_url":"https://api.github.com/users/vieux/repos","events_url":"https://api.github.com/users/vieux/events{/privacy}","received_events_url":"https://api.github.com/users/vieux/received_events","type":"User","site_admin":false},"comments":14,"review_comments":2,"commits":2,"additions":98,"deletions":33,"changed_files":14}}