{"id":20697423,"url":"https://github.com/epomatti/azure-container-instances-security","last_synced_at":"2026-04-11T13:34:23.484Z","repository":{"id":214346958,"uuid":"736243418","full_name":"epomatti/azure-container-instances-security","owner":"epomatti","description":"Azure Container Instances with private network","archived":false,"fork":false,"pushed_at":"2025-05-28T14:03:42.000Z","size":188,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-28T15:21:01.447Z","etag":null,"topics":["aci","application-gateway","artifact-cache","azure","azure-application-gateway","azure-container-instances","azure-security","cache","container-instances","docker","go","golang","terraform"],"latest_commit_sha":null,"homepage":"","language":"HCL","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/epomatti.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-12-27T11:20:52.000Z","updated_at":"2025-05-28T14:03:45.000Z","dependencies_parsed_at":"2024-11-17T00:20:23.434Z","dependency_job_id":"6468ab1b-5ab3-4c1f-9994-89a56247a2dd","html_url":"https://github.com/epomatti/azure-container-instances-security","commit_stats":null,"previous_names":["epomatti/azure-container-instances-security"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/epomatti/azure-container-instances-security","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epomatti%2Fazure-container-instances-security","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epomatti%2Fazure-container-instances-security/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epomatti%2Fazure-container-instances-security/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epomatti%2Fazure-container-instances-security/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/epomatti","download_url":"https://codeload.github.com/epomatti/azure-container-instances-security/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epomatti%2Fazure-container-instances-security/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31682953,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-11T13:07:20.380Z","status":"ssl_error","status_checked_at":"2026-04-11T13:06:47.903Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["aci","application-gateway","artifact-cache","azure","azure-application-gateway","azure-container-instances","azure-security","cache","container-instances","docker","go","golang","terraform"],"created_at":"2024-11-17T00:17:58.246Z","updated_at":"2026-04-11T13:34:23.454Z","avatar_url":"https://github.com/epomatti.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Azure Container Registry - Security features\n\nDeploy Azure Container Instances groups in a VNET.\n\n\u003cimg src=\".assets/azure-container-instances.png\" /\u003e\n\nStart by creating the `.auto.tfvars` from the template:\n\n```sh\ncp config/template.tfvars .auto.tfvars\n```\n\nCreate the first batch of resources:\n\n```sh\nterraform init\nterraform apply -auto-approve\n```\n\nThe container image must exist in order to deploy the CI.\n\n## Deployment\n\nOnce the resources are created, build and push the application image to the ACR:\n\n```sh\ncd app\n\naz acr build --registry crchokolatte --image app:latest --file Dockerfile.amd64 .\n```\n\nOnce the image is pushed, set the config to create the CI and the AGW:\n\n```terraform\ncreate_containers = true\n```\n\nCreate the remaining resources:\n\n```sh\nterraform apply -auto-approve\n```\n\nConnect to the application using the Application Gateway public address.\n\n## Deployment (YAML)\n\nAn option to [deploy containers with YAML][1] files is also available.\n\nExample copied from the documentation in the [deploy-aci.yaml](./deploy-aci.yaml) file:\n\n```sh\naz group create --name myResourceGroup --location eastus\naz container create --resource-group myResourceGroup --file deploy-aci.yaml\n```\n\n## Artifact Cache\n\nAzure Container Registry supports [Artifact Cache][2]. Follow the steps in the documentation to create a caching rule.\n\nHere's a NGINX rule via [CLI][3]:\n\n\u003e [!IMPORTANT]\n\u003e Use authentication for real world deployment\n\n```sh\naz acr cache create -r crchokolatte -n nginx -s docker.io/library/nginx -t nginx\n```\n\nLogin to ACR and run a test pull command:\n\n```sh\naz acr login -n crchokolatte\ndocker pull crchokolatte.azurecr.io/nginx:latest\n```\n\nDeploy a new instance using the cached NGINX:\n\n\u003e [!IMPORTANT]\n\u003e This procedure might require a [service identity][4].\n\n```sh\naz group create --name rg-artifact-cache --location eastus\naz container create --resource-group rg-artifact-cache --file deploy-nginx-cached.yaml\n```\n\n## Purge\n\nTesting the [purge][purge] feature.\n\nBuild and tag the application image:\n\n```sh\ndocker build -f ./app/Dockerfile.amd64 \\\n  -t \"\u003cregistry-name\u003e.azurecr.io/vulnerable-image:latest\" \\\n  -t \"\u003cregistry-name\u003e.azurecr.io/vulnerable-image:1.0.0\" \\\n  ./app\n```\n\nLogin to ACR and push the image tags:\n\n```sh\naz acr login -n \u003cregistry-name\u003e\ndocker push \"\u003cregistry-name\u003e.azurecr.io/vulnerable-image:latest\"\ndocker push \"\u003cregistry-name\u003e.azurecr.io/vulnerable-image:1.0.0\"\n```\n\nPurge the images using [ACR tasks][acr-tasks]:\n\n\u003e [!TIP]\n\u003e Preview the purge with `--dry-run`\n\n```sh\naz acr run --registry \u003cyour-acr-name\u003e --file purge.yaml /dev/null\n```\n\n## Query Vulnerabilities\n\nSample queries can be found at [DfC resource graph samples](https://docs.azure.cn/en-us/defender-for-cloud/resource-graph-samples?tabs=azure-cli) and [ACR resource graph samples](https://learn.microsoft.com/en-us/azure/container-registry/resource-graph-samples?tabs=azure-cli).\n\n\n[1]: https://learn.microsoft.com/en-us/azure/container-instances/container-instances-multi-container-yaml#deploy-the-container-group\n[2]: https://learn.microsoft.com/en-us/azure/container-registry/tutorial-artifact-cache\n[3]: https://learn.microsoft.com/en-us/azure/container-registry/tutorial-enable-artifact-cache-cli\n[4]: https://learn.microsoft.com/en-us/answers/questions/1289158/container-image-unable-to-pull-private-azure-conta\n[purge]: https://learn.microsoft.com/en-us/azure/container-registry/container-registry-auto-purge\n[acr-tasks]: https://learn.microsoft.com/en-us/azure/container-registry/container-registry-tasks-reference-yaml\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fepomatti%2Fazure-container-instances-security","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fepomatti%2Fazure-container-instances-security","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fepomatti%2Fazure-container-instances-security/lists"}