Skip to content

Commit b348a31

Browse files
committed
Add git to CLI variants
- `docker build .` / `docker buildx build .` might shell out to git to ask about the context directory's `git status` - `DOCKER_BUILDKIT=0 docker build https://example/foo.git` will run git in the client context - `docker buildx build https://example/foo.git` will run git in the daemon context
1 parent 75c7311 commit b348a31

File tree

5 files changed

+15
-5
lines changed

5 files changed

+15
-5
lines changed

24/cli/Dockerfile

Lines changed: 3 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

25/cli/Dockerfile

Lines changed: 3 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

26/cli/Dockerfile

Lines changed: 3 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

27/cli/Dockerfile

Lines changed: 3 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Dockerfile-cli.template

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ FROM alpine:3.20
44
RUN apk add --no-cache \
55
ca-certificates \
66
# DOCKER_HOST=ssh://... -- https://github.com/docker/cli/pull/1014
7-
openssh-client
7+
openssh-client \
8+
# https://github.com/docker-library/docker/issues/482#issuecomment-2197116408
9+
git
810

911
# ensure that nsswitch.conf is set up for Go's "netgo" implementation (which Docker explicitly uses)
1012
# - https://github.com/moby/moby/blob/v24.0.6/hack/make.sh#L111

0 commit comments

Comments
 (0)