Azure / Azure/azure-cli

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

Open
#21,114 8 comments 0 reactions 1 assignee Claimed by @toddysm View on GitHub
act-observability-squad Container Registry Service Attention
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

**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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.