{"id":15858615,"url":"https://github.com/bpmct/coder-ecr-sync","last_synced_at":"2025-08-01T06:09:13.006Z","repository":{"id":117906406,"uuid":"353718662","full_name":"bpmct/coder-ecr-sync","owner":"bpmct","description":null,"archived":false,"fork":false,"pushed_at":"2021-04-01T14:17:58.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-07T12:49:00.338Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bpmct.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-04-01T14:00:25.000Z","updated_at":"2021-04-01T14:18:01.000Z","dependencies_parsed_at":null,"dependency_job_id":"1dc95bc9-bb7d-4be4-9c0b-9caf670c660e","html_url":"https://github.com/bpmct/coder-ecr-sync","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bpmct%2Fcoder-ecr-sync","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bpmct%2Fcoder-ecr-sync/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bpmct%2Fcoder-ecr-sync/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bpmct%2Fcoder-ecr-sync/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bpmct","download_url":"https://codeload.github.com/bpmct/coder-ecr-sync/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246705191,"owners_count":20820689,"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","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-10-05T21:00:49.251Z","updated_at":"2025-04-01T19:45:53.452Z","avatar_url":"https://github.com/bpmct.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# coder-ecr-sync\n\nWorkaround to get AWS ECR working in Coder / example of scripting with the [Coder REST API](https://apidocs.coder.com).\n\nRun this script (in a cron operation) to update your registry in Coder with the latest ECR password. It also edits the registry name to include the date, so it is easy to debug if/when the script failed. Comment/edit that line to keep your existing registry name.\n\n## Context\n\nCoder currently only supports password-based authentication to registries. AWS ECR can [generate a password token](https://docs.aws.amazon.com/cli/latest/reference/ecr/get-login-password.html) but it only lasts 12 hours. This script, if ran in a cron operation, will update the Coder registry with the latest password. (username should remain as `AWS`).\n\n## Requirements\n\n- Coder API Token [(create one here)](https://github.com/cdr/coder-cli/blob/master/docs/coder_tokens_create.md)\n\n- AWS CLI authenticated on this machine/runner (it uses the `aws ecr get-login-password` command)\n\n- These values. Set inside the script or as env vars:\n\n```text\nCODER_URL\n(ex. \"https://coder.yoursite.com\")\n\nCODER_API_TOKEN\n(get it with coder-cli):\n$ coder tokens create ecr-sync\n\nCODER_ORG_ID\n(visit this coder when you are logged in):\nhttps://coder.yoursite.com/api/v0/orgs\n\nCODER_REGISTRY_ID\n(visit this coder when you are logged in):\nhttps://coder.yoursite.com/api/v0/registries?org={orgid}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbpmct%2Fcoder-ecr-sync","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbpmct%2Fcoder-ecr-sync","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbpmct%2Fcoder-ecr-sync/lists"}