Skip to content

WARNING: Excluding '.git' based on default ignore rules #21114

@qwertykg

Description

@qwertykg

Describe the bug
am trying to access my git repo and perform some git commands inside the docker machine I built using az acr build. The machine builds correctly. But I get these warnings:

WARNING: The login server endpoint suffix '.azurecr.io' is automatically omitted.
WARNING: Packing source code into tar to upload...
WARNING: Excluding '.git' based on default ignore rules
WARNING: Excluding '.gitignore' based on default ignore rules

And as you would expect, later when I try and copy files from my working directory to the docker machine via the COPY task, the .git folder is not there. It seems like the default ignore settings for az acr build ignores the .git folder when it builds the docker machine. This seems abit weird because I didnt add .git to my dockerignore. So not sure why its being ignored or how to undo it

To Reproduce
Run this command:

az acr build
-t $(docker_repository_name)/$(docker_image_name):$(Build.BuildNumber)
--registry $(docker_registry_host)
--file src/Dockerfile /home/vsts/work/1/s/
--platform $(docker_platform)

The warnings will show

Expected behavior
My expectation was that .git would be available to docker since it wasnt in the dockerignore file

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions