{"action":"created","issue":{"url":"https://api.github.com/repos/docker/distribution/issues/1011","labels_url":"https://api.github.com/repos/docker/distribution/issues/1011/labels{/name}","comments_url":"https://api.github.com/repos/docker/distribution/issues/1011/comments","events_url":"https://api.github.com/repos/docker/distribution/issues/1011/events","html_url":"https://github.com/docker/distribution/issues/1011","id":107738595,"number":1011,"title":"Can't read config from environment","user":{"login":"ndarilek","id":1172,"avatar_url":"https://avatars.githubusercontent.com/u/1172?v=3","gravatar_id":"","url":"https://api.github.com/users/ndarilek","html_url":"https://github.com/ndarilek","followers_url":"https://api.github.com/users/ndarilek/followers","following_url":"https://api.github.com/users/ndarilek/following{/other_user}","gists_url":"https://api.github.com/users/ndarilek/gists{/gist_id}","starred_url":"https://api.github.com/users/ndarilek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ndarilek/subscriptions","organizations_url":"https://api.github.com/users/ndarilek/orgs","repos_url":"https://api.github.com/users/ndarilek/repos","events_url":"https://api.github.com/users/ndarilek/events{/privacy}","received_events_url":"https://api.github.com/users/ndarilek/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"RichardScothern","id":922018,"avatar_url":"https://avatars.githubusercontent.com/u/922018?v=3","gravatar_id":"","url":"https://api.github.com/users/RichardScothern","html_url":"https://github.com/RichardScothern","followers_url":"https://api.github.com/users/RichardScothern/followers","following_url":"https://api.github.com/users/RichardScothern/following{/other_user}","gists_url":"https://api.github.com/users/RichardScothern/gists{/gist_id}","starred_url":"https://api.github.com/users/RichardScothern/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RichardScothern/subscriptions","organizations_url":"https://api.github.com/users/RichardScothern/orgs","repos_url":"https://api.github.com/users/RichardScothern/repos","events_url":"https://api.github.com/users/RichardScothern/events{/privacy}","received_events_url":"https://api.github.com/users/RichardScothern/received_events","type":"User","site_admin":false},"milestone":null,"comments":5,"created_at":"2015-09-22T15:25:01Z","updated_at":"2015-09-22T18:46:08Z","closed_at":null,"body":"I have the following docker-compose.yml:\r\n\r\n```\r\nRegistry:\r\n  restart: always\r\n  image: registry:2\r\n  volumes:\r\n  - /home/registry:/var/lib/registry\r\n  environment:\r\n    REGISTRY_STORAGE_S3_ACCESSKEY: xxx\r\n    REGISTRY_STORAGE_S3_SECRETKEY: xxx\r\n    REGISTRY_STORAGE_S3_REGION: us-east-1\r\n    REGISTRY_STORAGE_S3_BUCKET: existing.s3.bucket\r\n    REGISTRY_STORAGE_S3_SECURE: true\r\n    REGISTRY_STORAGE_S3_V4AUTH: true\r\n    REGISTRY_AUTH_HTPASSWD_REALM: Registry\r\n    REGISTRY_AUTH_HTPASSWD_PATH: /var/lib/registry/auth/htpasswd\r\n```\r\n\r\nI have verified that these variables appear in the container's environment. The following does not happen:\r\n\r\n1. I am not prompted to authenticate with my registry despite the existence of credentials and a valid htpasswd at the specified path.\r\n2. My S3 bucket remains empty.\r\n3. Images are persisted to the local filesystem.\r\n4. I see nothing in the logs indicating communication with S3, attempts to read htpasswd and authenticate requests, etc.\r\n\r\nIt is almost as if the default config is being used and none of my environment variables are being read. What am I doing wrong here? Seems like I'm following the docs for overriding config via the environment but nothing changes.\r\n\r\nThanks."},"comment":{"url":"https://api.github.com/repos/docker/distribution/issues/comments/142382281","html_url":"https://github.com/docker/distribution/issues/1011#issuecomment-142382281","issue_url":"https://api.github.com/repos/docker/distribution/issues/1011","id":142382281,"user":{"login":"ndarilek","id":1172,"avatar_url":"https://avatars.githubusercontent.com/u/1172?v=3","gravatar_id":"","url":"https://api.github.com/users/ndarilek","html_url":"https://github.com/ndarilek","followers_url":"https://api.github.com/users/ndarilek/followers","following_url":"https://api.github.com/users/ndarilek/following{/other_user}","gists_url":"https://api.github.com/users/ndarilek/gists{/gist_id}","starred_url":"https://api.github.com/users/ndarilek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ndarilek/subscriptions","organizations_url":"https://api.github.com/users/ndarilek/orgs","repos_url":"https://api.github.com/users/ndarilek/repos","events_url":"https://api.github.com/users/ndarilek/events{/privacy}","received_events_url":"https://api.github.com/users/ndarilek/received_events","type":"User","site_admin":false},"created_at":"2015-09-22T18:46:08Z","updated_at":"2015-09-22T18:46:08Z","body":"Maybe I'm just dense, but I don't see that I need:\n\n`storage: s3`\n\nanywhere. I do see that I need:\n\n```\nstorage:\n   s3:\n     ...\n```\n\nwhich is distinctly different from:\n\n```\nstorage: s3\nstorage:\n   s3:\n     ...\n```\n\nwhich, I don't think, is even valid. Note that I've been reviewing the \ndoc you've linked to twice now even before posting this issue. I've also \nreviewed the sample config from:\n\nhttps://github.com/docker/distribution/blob/master/cmd/registry/config-example.yml\n\nand it appears that storage options are defined as keys off of \n`storage`, not that `storage` is a root key with a string value.\n\nIf I do indeed need to define `REGISTRY_STORAGE=s3` in my environment, \nthat doesn't appear obvious to me from the documentation, and it may \nneed to be highlighted more.\n\nSorry, I'm not trying to seem snappy, it's just that I *am* reading the \ndocs you keep pointing me to, have been for hours in fact, and I'm not \nseeing this documented very obviously. The example of overriding configs \nvia environment variables even overrides a storage parameter but doesn't \nitself set the root parameter. Even if it isn't strictly necessary, I \nwould hope that it would do so if only to make the need explicitly clear.\n\nThanks.\n"}}