# Git mirrors and docker

**URL:** <https://forum.buildkite.community/t/git-mirrors-and-docker/1256>\
**Category:** Docker\
**Created:** [September 25, 2020, 3:51pm UTC](https://forum.buildkite.community/t/git-mirrors-and-docker/1256 "2020-09-25T15:51:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ngan](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.buildkite.community/ngan/32/662_2.png) [@ngan](https://forum.buildkite.community/u/ngan)\
**Post date:** [September 25, 2020, 3:51pm UTC](https://forum.buildkite.community/t/git-mirrors-and-docker/1256/1 "2020-09-25T15:51:41Z")

</div>

Hi BK team, I would love to get your feedback and advice on using the agent’s git mirror experimental feature with pipelines that use docker(-compose).

Inside the container, we are unable to do any git operations since the project’s clone is a reference one that points to the mirror clone. The mirror clone is in a path that isn’t accessible.

We could mount the mirror path but this seems a little weird. Especially because the path has to be derived somehow during the step. Side note: it would be cool if BK set an environment variable for the mirror repo so there’s a stable API.

Would like to hear how you or other folks are handling this?

---

<div class="post-metadata">

**Author:** ![pda](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.buildkite.community/pda/32/708_2.png) [@pda](https://forum.buildkite.community/u/pda)\
**Post date:** [September 28, 2020, 7:45am UTC](https://forum.buildkite.community/t/git-mirrors-and-docker/1256/2 "2020-09-28T07:45:32Z")

</div>

Here’s an idea for adding this to the agent and the docker / docker-compose plugins:

> <https://github.com/buildkite/agent/pull/1311>

---

<div class="post-metadata">

**Author:** ![ngan](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.buildkite.community/ngan/32/662_2.png) [@ngan](https://forum.buildkite.community/u/ngan)\
**Post date:** [September 28, 2020, 4:15pm UTC](https://forum.buildkite.community/t/git-mirrors-and-docker/1256/3 "2020-09-28T16:15:04Z")

</div>

Thanks for the quick turnaround @pda – looking forward to seeing this land.
