{"id":20560382,"url":"https://github.com/andreaskoch/docker-registry-with-authentication","last_synced_at":"2025-10-10T06:18:51.100Z","repository":{"id":22267263,"uuid":"25601371","full_name":"andreaskoch/docker-registry-with-authentication","owner":"andreaskoch","description":"A private docker registry that used a NGINX reverse proxy to add basic authentication","archived":false,"fork":false,"pushed_at":"2014-10-22T20:40:55.000Z","size":17684,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-13T05:39:59.465Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/andreaskoch.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-10-22T19:55:31.000Z","updated_at":"2015-01-07T12:59:26.000Z","dependencies_parsed_at":"2022-08-20T13:40:19.912Z","dependency_job_id":null,"html_url":"https://github.com/andreaskoch/docker-registry-with-authentication","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/andreaskoch/docker-registry-with-authentication","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreaskoch%2Fdocker-registry-with-authentication","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreaskoch%2Fdocker-registry-with-authentication/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreaskoch%2Fdocker-registry-with-authentication/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreaskoch%2Fdocker-registry-with-authentication/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andreaskoch","download_url":"https://codeload.github.com/andreaskoch/docker-registry-with-authentication/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreaskoch%2Fdocker-registry-with-authentication/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279002970,"owners_count":26083488,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-10T02:00:06.843Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-16T03:54:24.146Z","updated_at":"2025-10-10T06:18:51.079Z","avatar_url":"https://github.com/andreaskoch.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Custom Docker Registry with Authentication\n\nA private docker registry that used a NGINX reverse proxy to add basic authentication.\n\n## Requirements\n\n### 1. Amazon S3 Credentials\n\nThe run-script of this registry is configured to use Amazon S3 as the storage-backend. So you need the following parameters available before you start your registry:\n\n- S3 Bucket Name\n- AWS Key\n- AWS Secret\n\n### 2. A SSL certificate\n\nSince this image is using basic authentication via HTTPs to secure your docker registry you should have an SSL certificate and private key that matches the hostname your planning to use for the registry (and that is trusted by your computer).\n\n## Usage\n\n![Screenrecording: How to build and run the private docker-registry with basic authentication](documentation/building-and-running-docker-registry-with-authentication.gif)\n\n### 1. Build the reverse proxy image\n\nBuild the reverse-proxy image:\n\n```bash\ncd \u003cproject-directory\u003e\ncd reverse-proxy\nsudo docker build -t=andreaskoch/reverse-proxy .\n```\n\n### 2. Configure SSL\n\nPlace the .key and .cert files of your site in the `sites` folder.\nMake sure the certificate matches the hostname you are using and that the certificates CA is trusted by your operating system.\n\nOtherwise you will get errors like these:\n\n\u003e Error: Invalid Registry endpoint: Get https://localhost/v1/_ping: x509: certificate is valid for registry.example.com, not localhost\n\n\u003e Error response from daemon: Invalid Registry endpoint: Get https://localhost/v1/_ping: x509: certificate signed by unknown authority\n\n### 3. Create a basic auth file\n\nAdd some users to the `.htpasswd` files (or place your existing password file in the `sites folder):\n\n```bash\ncd \u003cproject-direcotry\u003e\ncd sites\nhtpasswc -c .htpasswd user1 password1\n```\n\n### 4. Start the registry container\n\nStart the registry and reverse-proxy containers:\n\n```bash\ncd \u003cproject-direcotry\u003e\n\nAWS_BUCKET=\u003cyour-docker-registry name\u003e\nAWS_KEY=\u003cyour-aws-key\u003e\nAWS_SECRET=\u003cyour-aws-secret\u003e\n\nsudo ./run.sh $AWS_BUCKET $AWS_KEY $AWS_SECRET\n```\n\n### 5. Test the connection\n\nYou should be able to access the repository under your local ip-address:\n\n```bash\ncurl --insecure -u user1:password1 https://127.0.0.1\n```\n\nThe result should look something-like this:\n\n\u003e \"docker-registry server (s3) (v0.8.1)\"\n\nIf that worked you can try to login with docker:\n\n```bash\ndocker login https://127.0.0.1\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandreaskoch%2Fdocker-registry-with-authentication","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandreaskoch%2Fdocker-registry-with-authentication","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandreaskoch%2Fdocker-registry-with-authentication/lists"}