Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,9 @@ the user's `~/.ssh` configuration to the container.
`CQFD_NO_USER_GIT_CONFIG`: Set to `true` to disable forwarding
the user's `~/.gitconfig` configuration to the container.

`CQFD_NO_SYSTEM_GIT_CONFIG`: Set to `true` to disable forwarding
the system's `/etc/gitconfig` configuration to the container.

`CQFD_NO_SSH_AUTH_SOCK`: Set to `true` to disable forwarding the
SSH authentication socket to the container.

Expand Down Expand Up @@ -426,14 +429,14 @@ defined container.
Example:

```sh
fred@host:~/project$ cat get-container-pretty-name.sh
fred@host:~/project$ cat get-container-pretty-name.sh
#!/usr/bin/env -S cqfd shell
if ! test -e /.dockerenv; then
exit 1
fi
source /etc/os-release
echo "$PRETTY_NAME"
fred@host:~/project$ ./get-container-pretty-name.sh
fred@host:~/project$ ./get-container-pretty-name.sh
Debian GNU/Linux 12 (bookworm)
```

Expand Down
4 changes: 4 additions & 0 deletions cqfd
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,10 @@ docker_run() {
args+=(--mount "type=bind,src=$HOME/.gitconfig,dst=$cqfd_user_home/.gitconfig")
fi

if [ "$CQFD_NO_SYSTEM_GIT_CONFIG" != true ] && [ -f "/etc/gitconfig" ]; then
args+=(--mount "type=bind,src=/etc/gitconfig,dst=/etc/gitconfig")
fi

if [ "$CQFD_BIND_DOCKER_SOCK" = true ] || [ "$build_bind_docker_sock" = true ]; then
args+=(--volume /var/run/docker.sock:/var/run/docker.sock)
fi
Expand Down
4 changes: 4 additions & 0 deletions cqfd.1.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,10 @@ another container or another build command.
Set to _true_ to disable forwarding the user's _~/.gitconfig_
configuration to the container.

*CQFD_NO_SYSTEM_GIT_CONFIG*::
Set to _true_ to disable forwarding the system's _/etc/gitconfig_
configuration to the container.

*CQFD_NO_SSH_AUTH_SOCK*::
Set to _true_ to disable forwarding the SSH authentication socket to
the container.
Expand Down
Loading