-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Az acr build parses all files in repo even if excluded in .dockerignore #31250
Copy link
Copy link
Open
Labels
Auto-AssignAuto assign by botAuto assign by botContainer Registryaz acraz acrPossible-SolutionService AttentionThis issue is responsible by Azure service team.This issue is responsible by Azure service team.Similar-Issueact-observability-squadbugThis issue requires a change to an existing behavior in the product in order to be resolved.This issue requires a change to an existing behavior in the product in order to be resolved.customer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.
Metadata
Metadata
Labels
Auto-AssignAuto assign by botAuto assign by botContainer Registryaz acraz acrPossible-SolutionService AttentionThis issue is responsible by Azure service team.This issue is responsible by Azure service team.Similar-Issueact-observability-squadbugThis issue requires a change to an existing behavior in the product in order to be resolved.This issue requires a change to an existing behavior in the product in order to be resolved.customer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.
Describe the bug
I am trying to build a docker image with
az acr build -t <repo/name:tag> -f Dockerfile -r <registry> .and I have a.dockerignorefile with.venvin it. Howeveraz acr buildparses all files within the dockerignore file, and it is very slow. It just does not ignore the folder, but parses every file within ignored folders. I don't think this should happenRelated command
az acr build -t <repo/name:tag> -f Dockerfile -r <registry> .Errors
After more than 30min, I get an error:
Issue script & Debug output
Long logs of the form
cli.azure.cli.command_modules.acr._archive_utils: .dockerignore: no rule for '.venv/lib/python3.12/site-packages/pyright/dist/dist/typeshed-fallback/stubs/TgCrypto'. parent ignore 'True'Expected behavior
Running az acr build should be fast even if I am using a virtual environment
Environment Summary
azure-cli 2.71.0 core 2.71.0
telemetry 1.1.0 Extensions:
bastion 1.4.0
ssh 2.0.6 Dependencies:
msal 1.31.2b1
azure-mgmt-resource 23.1.1 Python location 'C:\Program Files\Microsoft SDKs\Azure\CLI2\python.exe'
Config directory 'C:\Users\javierzazo.azure'
Extensions directory 'C:\Users\javierzazo.azure\cliextensions' Python (Windows) 3.12.8 (tags/v3.12.8:2dc476b, Dec 3 2024, 19:30:04) [MSC v.1942 64 bit (AMD64)]
Legal docs and information: aka.ms/AzureCliLegal
Your CLI is up-to-date.
Additional context
No response