for-win icon indicating copy to clipboard operation
for-win copied to clipboard

Unable to bind volume to PWD in Git bash

Open nc-jeni opened this issue 1 year ago • 0 comments

Description

Unable to bind volume to PWD in Git bash as it prefix the directory with \Git\.

Reproduce

docker run -it --rm -v "$(PWD)/..:/local_folder" ubuntu bash ls -la

root@5e84fdf48b70:/# ls -la
total 56
drwxr-xr-x   1 root root 4096 Apr  9 07:52  .
drwxr-xr-x   1 root root 4096 Apr  9 07:52  ..
-rwxr-xr-x   1 root root    0 Apr  9 07:52  .dockerenv
drwxrwxrwx   1 root root    0 Apr  9 07:48 '\Git\local_folder'

Expected behavior

No \Git\ prefix on the local_folder.

root@5e84fdf48b70:/# ls -la
total 56
drwxr-xr-x   1 root root 4096 Apr  9 07:52  .
drwxr-xr-x   1 root root 4096 Apr  9 07:52  ..
-rwxr-xr-x   1 root root    0 Apr  9 07:52  .dockerenv
drwxrwxrwx   1 root root    0 Apr  9 07:48 'local_folder'

docker version

Client:
 Cloud integration: v1.0.31
 Version:           20.10.24
 API version:       1.41
 Go version:        go1.19.7
 Git commit:        297e128
 Built:             Tue Apr  4 18:28:08 2023
 OS/Arch:           windows/amd64
 Context:           default
 Experimental:      true

Server: Docker Desktop 4.18.0 (104112)
 Engine:
  Version:          20.10.24
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.19.7
  Git commit:       5d6db84
  Built:            Tue Apr  4 18:18:42 2023
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.6.18
  GitCommit:        2456e983eb9e37e47538f59ea18f2043c9a73640
 runc:
  Version:          1.1.4
  GitCommit:        v1.1.4-0-g5fd4c4d
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

docker info

Client:
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc., v0.10.4)
  compose: Docker Compose (Docker Inc., v2.17.2)
  dev: Docker Dev Environments (Docker Inc., v0.1.0)
  extension: Manages Docker extensions (Docker Inc., v0.2.19)
  init: Creates Docker-related starter files for your project (Docker Inc., v0.1.0-beta.2)
  sbom: View the packaged-based Software Bill Of Materials (SBOM) for an image (Anchore Inc., 0.6.0)
  scan: Docker Scan (Docker Inc., v0.25.0)
  scout: Command line tool for Docker Scout (Docker Inc., v0.9.0)

Server:
 Containers: 5
  Running: 0
  Paused: 0
  Stopped: 5
 Images: 27
 Server Version: 20.10.24
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Cgroup Version: 2
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 io.containerd.runtime.v1.linux runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 2456e983eb9e37e47538f59ea18f2043c9a73640
 runc version: v1.1.4-0-g5fd4c4d
 init version: de40ad0
 Security Options:
  seccomp
   Profile: default
  cgroupns
 Kernel Version: 5.15.49-linuxkit
 Operating System: Docker Desktop
 OSType: linux
 Architecture: x86_64
 CPUs: 8
 Total Memory: 3.84GiB
 Name: docker-desktop
 ID: QFXW:Q4WD:QSKG:FM3M:TWU2:CSJY:CV7U:Q4YE:UVLD:PDAF:NNMA:FOT4
 Docker Root Dir: /var/lib/docker
 Debug Mode: true
  File Descriptors: 43
  Goroutines: 49
  System Time: 2024-04-09T07:55:44.137725983Z
  EventsListeners: 7
 HTTP Proxy: http.docker.internal:3128
 HTTPS Proxy: http.docker.internal:3128
 No Proxy: hubproxy.docker.internal
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: false
 Insecure Registries:
  hubproxy.docker.internal:5555
  127.0.0.0/8
 Registry Mirrors:
  https://registry.docker.intern.arosii.com/
 Live Restore Enabled: false

Diagnostics ID

1D98E743-C916-4085-A7CA-CABE552A7E0D/20240409080133

Additional Info

No response

nc-jeni avatar Apr 09 '24 08:04 nc-jeni