Skip to content

Commit

Permalink
Add git to CLI variants
Browse files Browse the repository at this point in the history
- `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
  • Loading branch information
tianon committed Jul 1, 2024
1 parent 75c7311 commit b348a31
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 5 deletions.
4 changes: 3 additions & 1 deletion 24/cli/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion 25/cli/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion 26/cli/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion 27/cli/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion Dockerfile-cli.template
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ FROM alpine:3.20
RUN apk add --no-cache \
ca-certificates \
# DOCKER_HOST=ssh://... -- https://github.com/docker/cli/pull/1014
openssh-client
openssh-client \
# https://github.com/docker-library/docker/issues/482#issuecomment-2197116408
git

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

0 comments on commit b348a31

Please sign in to comment.