{"id":22246354,"url":"https://github.com/thgossler/acrsync","last_synced_at":"2026-05-10T19:24:22.188Z","repository":{"id":180461202,"uuid":"557904542","full_name":"thgossler/AcrSync","owner":"thgossler","description":"Synchronize repos and tags from a source to a target Azure Container Registry (ACR) including removal of deleted entries.","archived":false,"fork":false,"pushed_at":"2022-12-21T15:31:07.000Z","size":18,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-30T10:29:38.721Z","etag":null,"topics":["acr","azure","container","docker","powershell","registry","sync","synchronization"],"latest_commit_sha":null,"homepage":"","language":"PowerShell","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/thgossler.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","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},"funding":{"github":["thgossler"]}},"created_at":"2022-10-26T14:21:10.000Z","updated_at":"2022-10-26T15:13:57.000Z","dependencies_parsed_at":null,"dependency_job_id":"939e27e3-75e8-4041-a6dc-d3f4fbe9b375","html_url":"https://github.com/thgossler/AcrSync","commit_stats":null,"previous_names":["thgossler/acrsync"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thgossler%2FAcrSync","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thgossler%2FAcrSync/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thgossler%2FAcrSync/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thgossler%2FAcrSync/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thgossler","download_url":"https://codeload.github.com/thgossler/AcrSync/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245450965,"owners_count":20617436,"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":["acr","azure","container","docker","powershell","registry","sync","synchronization"],"created_at":"2024-12-03T05:27:19.791Z","updated_at":"2026-05-10T19:24:17.166Z","avatar_url":"https://github.com/thgossler.png","language":"PowerShell","funding_links":["https://github.com/sponsors/thgossler"],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n[![Contributors][contributors-shield]][contributors-url]\n[![Forks][forks-shield]][forks-url]\n[![Stargazers][stars-shield]][stars-url]\n[![Issues][issues-shield]][issues-url]\n[![MIT License][license-shield]][license-url]\n\n\u003c/div\u003e\n\n\u003c!-- PROJECT LOGO --\u003e\n\u003cbr /\u003e\n\u003cdiv align=\"center\"\u003e\n  \u003ch1 align=\"center\"\u003eAcrSync\u003c/h1\u003e\n\n  \u003cp align=\"center\"\u003e\n    Synchronize repositories and tags from a source to a target Azure Container Registry.\n    \u003cbr /\u003e\n    \u003ca href=\"https://github.com/thgossler/AcrSync/issues\"\u003eReport Bug\u003c/a\u003e\n    ·\n    \u003ca href=\"https://github.com/thgossler/AcrSync/issues\"\u003eRequest Feature\u003c/a\u003e\n    ·\n    \u003ca href=\"https://github.com/thgossler/AcrSync#contributing\"\u003eContribute\u003c/a\u003e\n    ·\n    \u003ca href=\"https://github.com/sponsors/thgossler\"\u003eSponsor project\u003c/a\u003e\n  \u003c/p\u003e\n\u003c/div\u003e\n\n\n## General Introduction\n\nThis script synchronized repositories and tags from a source to a target \nAzure Container Registry. It also removes items from the target registry \nif they are not existing anymore in the source registry.\n\nThe source and target ACR instances can be in different Azure clouds\n(including sovereign Azure clouds like the AzureChinaCloud), in different\nAzure subscriptions and be associated with different AAD tenants.\n\nThe script always runs once immediately. If a scheduled job interval is\nspecified, then it runs repeatedly in that frequency.\n\nWhen no parameters are specified, then the environment variables as\nmentioned under [Input Parameters](#input-parameters) are evaluated.\n\nThe sync can also be built and run as a Docker container.\n\n\n## Scripts\n\nAll scripts take parameters and can be called like cmdlets.\n\n`Set-EnvVars.ps1` creates environment settings commonly used by all scripts.\n\n`Run.ps1` starts the sync process (different variants, run on local machine).\n\n`Docker-build.ps1` wraps the sync script in a Docker container image (local).\n\n`Docker-publish.ps1` pushes the previously built Docker image to a remote registry.\n\n`Docker-deploy-aci.ps1` runs a container based on the published image on Azure Container Instances (ACI).\n\n\n## Prerequisites\n\n- PowerShell 7+\n- Az.Accounts module\n- Az.KeyVault module\n- Az.ContainerRegistry module\n- Docker service running\n\n\n## Input Parameters\n\nInput parameters are read from the following environment variables:\n\n`ACRSYNC_CONTAINER_IMAGE_NAME_TAG`, e.g. 'my-acr-sync:latest' (used to avoid deleting its own image)\n\n`ACRSYNC_TARGET_ACR_NAME`, e.g. 'myTargetACR'\n\n`ACRSYNC_TARGET_ACR_RESOURCEGROUP_NAME`\n\n`ACRSYNC_TARGET_ACR_SUBSCRIPTION_ID`\n\n`ACRSYNC_TARGET_CLOUDENV_NAME` (default: `AzureCloud`, see `(Get-AzEnvironment).Name`)\n\n`ACRSYNC_TARGET_TENANT_ID`\n\n`ACRSYNC_TARGET_KEYVAULT_NAME`, e.g. 'myTargetKV'\n\n`ACRSYNC_TARGET_SP_CLIENT_ID`\n\n`ACRSYNC_TARGET_SP_CLIENT_SECRET`\n\n`ACRSYNC_TARGET_KEYVAULT_SOURCE_ACR_SP_CLIENTID_SECRET_NAME` (default: `ACRSYNC_TARGET_SP_CLIENT_ID`)\n\n`ACRSYNC_TARGET_KEYVAULT_SOURCE_ACR_SP_CLIENTSECRET_SECRET_NAME` (default: `ACRSYNC_TARGET_SP_CLIENT_SECRET`)\n\n`ACRSYNC_TARGET_KEYVAULT_SUBSCRIPTION_ID` (default: `ACRSYNC_TARGET_ACR_SUBSCRIPTION_ID`)\n\n`ACRSYNC_SOURCE_CLOUDENV_NAME` (default: `ACRSYNC_TARGET_CLOUDENV_NAME`)\n\n`ACRSYNC_SOURCE_TENANT_ID` (default: `ACRSYNC_TARGET_TENANT_ID`)\n\n`ACRSYNC_SOURCE_SUBSCRIPTION_ID` (default: `ACRSYNC_TARGET_ACR_SUBSCRIPTION_ID`)\n\n`ACRSYNC_SOURCE_ACR_NAME`, e.g. 'mySourceACR'\n\n`ACRSYNC_SCHEDULED_JOB_INTERVAL_MINUTES` (default: `0`, i.e. only run once)\n\n`ACRSYNC_TARGET_ACI_SUBSCRIPTION_ID`\n\n`ACRSYNC_TARGET_ACI_LOCATION`, e.g. 'chinaeast2' (see: `(Get-AzLocation).Location`)\n\n`ACRSYNC_TARGET_ACI_RESOURCEGROUP_NAME`\n\n`ACRSYNC_TARGET_ACI_NAME`, e.g. 'myContainerGroup'\n\n\n## Contributing\n\nContributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.\n\nIf you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag \"enhancement\".\nDon't forget to give the project a star :wink: Thanks!\n\n1. Fork the Project\n2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the Branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\n\n## License\n\nDistributed under the MIT License. See [`LICENSE`](https://github.com/thgossler/AcrSync/blob/main/LICENSE) for more information.\n\n\n\u003c!-- MARKDOWN LINKS \u0026 IMAGES (https://www.markdownguide.org/basic-syntax/#reference-style-links) --\u003e\n[contributors-shield]: https://img.shields.io/github/contributors/thgossler/AcrSync.svg\n[contributors-url]: https://github.com/thgossler/AcrSync/graphs/contributors\n[forks-shield]: https://img.shields.io/github/forks/thgossler/AcrSync.svg\n[forks-url]: https://github.com/thgossler/AcrSync/network/members\n[stars-shield]: https://img.shields.io/github/stars/thgossler/AcrSync.svg\n[stars-url]: https://github.com/thgossler/AcrSync/stargazers\n[issues-shield]: https://img.shields.io/github/issues/thgossler/AcrSync.svg\n[issues-url]: https://github.com/thgossler/AcrSync/issues\n[license-shield]: https://img.shields.io/github/license/thgossler/AcrSync.svg\n[license-url]: https://github.com/thgossler/AcrSync/blob/main/LICENSE\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthgossler%2Facrsync","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthgossler%2Facrsync","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthgossler%2Facrsync/lists"}