{"action":"created","issue":{"url":"https://api.github.com/repos/docker/docker/issues/31039","repository_url":"https://api.github.com/repos/docker/docker","labels_url":"https://api.github.com/repos/docker/docker/issues/31039/labels{/name}","comments_url":"https://api.github.com/repos/docker/docker/issues/31039/comments","events_url":"https://api.github.com/repos/docker/docker/issues/31039/events","html_url":"https://github.com/docker/docker/issues/31039","id":207779125,"number":31039,"title":"Dockerfile FROM does not work with credsStore auth","user":{"login":"russellwstanley","id":2822975,"avatar_url":"https://avatars1.githubusercontent.com/u/2822975?v=3","gravatar_id":"","url":"https://api.github.com/users/russellwstanley","html_url":"https://github.com/russellwstanley","followers_url":"https://api.github.com/users/russellwstanley/followers","following_url":"https://api.github.com/users/russellwstanley/following{/other_user}","gists_url":"https://api.github.com/users/russellwstanley/gists{/gist_id}","starred_url":"https://api.github.com/users/russellwstanley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/russellwstanley/subscriptions","organizations_url":"https://api.github.com/users/russellwstanley/orgs","repos_url":"https://api.github.com/users/russellwstanley/repos","events_url":"https://api.github.com/users/russellwstanley/events{/privacy}","received_events_url":"https://api.github.com/users/russellwstanley/received_events","type":"User","site_admin":false},"labels":[{"id":73616520,"url":"https://api.github.com/repos/docker/docker/labels/area/builder","name":"area/builder","color":"fbca04","default":false},{"id":73635104,"url":"https://api.github.com/repos/docker/docker/labels/area/distribution","name":"area/distribution","color":"fbca04","default":false},{"id":182417459,"url":"https://api.github.com/repos/docker/docker/labels/status/more-info-needed","name":"status/more-info-needed","color":"C6A49A","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-02-15T11:33:40Z","updated_at":"2017-04-13T16:56:12Z","closed_at":null,"body":"**Description**\r\n\r\nwhen building an image from a dockerfile, the FROM command does not respect the credsStore auth defined in ~/.docker/config\r\n\r\n**Steps to reproduce the issue:**\r\n1. upload a private image to docker hub (myrepo/privateimage:latest)\r\n2. create a credsStore that serves out the credentials to access this image\r\n3. remove all hard coded auth from ~/.docker/config.json and add the \"credsStore\" line\r\n3. verify that you can pull the image with \"docker pull myrepo/privateimage:latest\"\r\n4. write a Dockerfile that contains a single line \"FROM myrepo/privateimage:latest\"\r\n5. run docker build . \r\n\r\nyou will get an error like this\r\n\r\nSending build context to Docker daemon 2.048 kB\r\nStep 1/1 : FROM myrepo/privateimage:latest\r\nrepository myrepo/privateimage not found: does not exist or no pull access\r\n\r\n\r\n**Describe the results you expected:**\r\n\r\ndocker should pull the image and build a new image with the Dockerfile\r\n\r\n\r\n**Additional information you deem important (e.g. issue happens only occasionally):**\r\n\r\n**Output of `docker version`:**\r\n\r\n```\r\nDocker version 1.13.1\r\n```\r\n\r\n**Output of `docker info`:**\r\n\r\n```\r\n\r\nContainers: 12\r\n Running: 0\r\n Paused: 0\r\n Stopped: 12\r\nImages: 67\r\nServer Version: 1.13.1\r\nStorage Driver: aufs\r\n Root Dir: /var/lib/docker/aufs\r\n Backing Filesystem: extfs\r\n Dirs: 164\r\n Dirperm1 Supported: true\r\nLogging Driver: json-file\r\nCgroup Driver: cgroupfs\r\nPlugins:\r\n Volume: local\r\n Network: bridge host macvlan null overlay\r\nSwarm: inactive\r\nRuntimes: runc\r\nDefault Runtime: runc\r\nInit Binary: docker-init\r\ncontainerd version: aa8187dbd3b7ad67d8e5e3a15115d3eef43a7ed1\r\nrunc version: 9df8b306d01f59d3a8029be411de015b7304dd8f\r\ninit version: 949e6fa\r\nSecurity Options:\r\n apparmor\r\n seccomp\r\n  Profile: default\r\nKernel Version: 4.4.0-62-generic\r\nOperating System: Ubuntu 16.04.2 LTS\r\nOSType: linux\r\nArchitecture: x86_64\r\nCPUs: 8\r\nTotal Memory: 15.56 GiB\r\nName: russell-workstation\r\nID: WTKG:PMKH:ZBQK:Q4OB:3X5J:RG53:XLRY:H5HP:SYVY:HNZY:2U2B:GIMJ\r\nDocker Root Dir: /var/lib/docker\r\nDebug Mode (client): false\r\nDebug Mode (server): false\r\nRegistry: https://index.docker.io/v1/\r\nWARNING: No swap limit support\r\nExperimental: false\r\nInsecure Registries:\r\n 127.0.0.0/8\r\n\r\n```\r\n\r\n**Additional environment details (AWS, VirtualBox, physical, etc.):**\r\n\r\nUbuntu 16:04 Desktop, physical\r\n"},"comment":{"url":"https://api.github.com/repos/docker/docker/issues/comments/293959668","html_url":"https://github.com/docker/docker/issues/31039#issuecomment-293959668","issue_url":"https://api.github.com/repos/docker/docker/issues/31039","id":293959668,"user":{"login":"alexchavez","id":4387739,"avatar_url":"https://avatars1.githubusercontent.com/u/4387739?v=3","gravatar_id":"","url":"https://api.github.com/users/alexchavez","html_url":"https://github.com/alexchavez","followers_url":"https://api.github.com/users/alexchavez/followers","following_url":"https://api.github.com/users/alexchavez/following{/other_user}","gists_url":"https://api.github.com/users/alexchavez/gists{/gist_id}","starred_url":"https://api.github.com/users/alexchavez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexchavez/subscriptions","organizations_url":"https://api.github.com/users/alexchavez/orgs","repos_url":"https://api.github.com/users/alexchavez/repos","events_url":"https://api.github.com/users/alexchavez/events{/privacy}","received_events_url":"https://api.github.com/users/alexchavez/received_events","type":"User","site_admin":false},"created_at":"2017-04-13T16:56:12Z","updated_at":"2017-04-13T16:56:12Z","body":"I have this issue as well. `docker pull $REGISTRY/$IMAGE:$VERSION` works but when my Dockerfile contains `FROM $REGISTRY/$IMAGE:$VERSION`, running `docker build .` fails, where `$REGISTRY` is an AWS registry.\r\n\r\nI tried updating https://github.com/docker/docker-credential-helpers/releases to latest as @thaJeztah suggested. After logging out or deleting `~/.docker/config.json` and logging back in:\r\n\r\n```\r\n$ cat ~/.docker/config.json\r\n{\r\n\t\"auths\": {\r\n\t\t\"<private registry>\": {}\r\n\t},\r\n\t\"credsStore\": \"osxkeychain\"\r\n}\r\n\r\n$ docker build .\r\nSending build context to Docker daemon 102.4 kB\r\n...\r\nunauthorized: authentication required\r\n```\r\n\r\nRemoving the `credsStore` entry and logging back in allows `docker build .` to run successfully:\r\n\r\n```\r\n{\r\n\t\"auths\": {\r\n\t\t\"<private registry>\": {\r\n\t\t\t\"auth\": \"<token>\"\r\n\t\t}\r\n\t}\r\n}\r\n```\r\n\r\n```\r\n$ docker version\r\nClient:\r\n Version:      17.03.1-ce\r\n API version:  1.27\r\n Go version:   go1.7.5\r\n Git commit:   c6d412e\r\n Built:        Tue Mar 28 00:40:02 2017\r\n OS/Arch:      darwin/amd64\r\n\r\nServer:\r\n Version:      17.03.1-ce\r\n API version:  1.27 (minimum version 1.12)\r\n Go version:   go1.7.5\r\n Git commit:   c6d412e\r\n Built:        Fri Mar 24 00:00:50 2017\r\n OS/Arch:      linux/amd64\r\n Experimental: true\r\n```\r\n\r\n```\r\n$ docker info\r\nContainers: 0\r\n Running: 0\r\n Paused: 0\r\n Stopped: 0\r\nImages: 11\r\nServer Version: 17.03.1-ce\r\nStorage Driver: overlay2\r\n Backing Filesystem: extfs\r\n Supports d_type: true\r\n Native Overlay Diff: true\r\nLogging Driver: json-file\r\nCgroup Driver: cgroupfs\r\nPlugins:\r\n Volume: local\r\n Network: bridge host ipvlan macvlan null overlay\r\nSwarm: inactive\r\nRuntimes: runc\r\nDefault Runtime: runc\r\nInit Binary: docker-init\r\ncontainerd version: 4ab9917febca54791c5f071a9d1f404867857fcc\r\nrunc version: 54296cf40ad8143b62dbcaa1d90e520a2136ddfe\r\ninit version: N/A (expected: 949e6facb77383876aeff8a6944dde66b3089574)\r\nSecurity Options:\r\n seccomp\r\n  Profile: default\r\nKernel Version: 4.9.13-moby\r\nOperating System: Alpine Linux v3.5\r\nOSType: linux\r\nArchitecture: x86_64\r\nCPUs: 4\r\nTotal Memory: 1.952 GiB\r\nName: moby\r\nID: JR3E:Z7X3:WICM:NRY2:SMTG:WGKI:4BLA:WNSC:3Y26:MJAS:M3RB:ZF6F\r\nDocker Root Dir: /var/lib/docker\r\nDebug Mode (client): false\r\nDebug Mode (server): true\r\n File Descriptors: 18\r\n Goroutines: 28\r\n System Time: 2017-04-13T16:27:49.174905177Z\r\n EventsListeners: 1\r\nNo Proxy: *.local, 169.254/16\r\nRegistry: https://index.docker.io/v1/\r\nExperimental: true\r\nInsecure Registries:\r\n 127.0.0.0/8\r\nLive Restore Enabled: false\r\n```"}}
{"actor":{"display_login":"alexchavez"}}