I can't use escape character \ for weird characters in folder names
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 6.1k
- Forks
- 2.2k
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 43
Description
Description
I have a folder name I want to use in a container, containing a comma. I can't use \ as escape character because that gets escaped itself automatically.
Steps to reproduce the issue:
Command using --mount:
docker run -ti -p8888:8888 --mount type=bind, source='/run/user/7300/gvfs/smb-share:server=srvr.company.com\,share=datafldr',target=datatargetfldr myimage:latest
Error:
invalid argument "type=bind,source=/run/user/7300/gfs/smb-share:server=srvr.company.com\\,share=datafldr,target=datatargetfldr" for "--mount" flag: unexpected key 'share' in 'share=tstb'
*mind the double \ in the error
Command using -v:
docker run -ti -p8888:8888 -v '/run/user/7300/gvfs/smb-share:server=srvr.company.com\,share=datafldr':datatargetfldr myimage:latest
Error:
docker: Error response from daemon: invalid mode: datatargetfldr
Additional information you deem important (e.g. issue happens only occasionally):
All variations of quotes, double quotes I tried give the same response. Soft links are not accepted by docker run.
Output of docker version:
Docker version 18.06.1-ce, build e68fc7a
Output of docker info:
Containers: 7
Running: 0
Paused: 0
Stopped: 7
Images: 21
Server Version: 18.06.1-ce
Storage Driver: overlay2
Backing Filesystem: xfs
Supports d_type: true
Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog
Swarm: active
NodeID: vhbp0lazbdwgpfhwgf1m7idx5
Is Manager: true
ClusterID: inaoma5573wvcl1wvu2m8scms
Managers: 1
Nodes: 1
Orchestration:
Task History Retention Limit: 5
Raft:
Snapshot Interval: 10000
Number of Old Snapshots to Retain: 0
Heartbeat Tick: 1
Election Tick: 10
Dispatcher:
Heartbeat Period: 5 seconds
CA Configuration:
Expiry Duration: 3 months
Force Rotate: 0
Autolock Managers: false
Root Rotation In Progress: false
Node Address: 172.22.199.150
Manager Addresses:
172.22.199.150:2377
Runtimes: runc nvidia
Default Runtime: runc
Init Binary: docker-init
containerd version: 468a545b9edcd5932818eb9de8e72413e616e86e
runc version: 69663f0bd4b60df09991c08812a60108003fa340
init version: fec3683
Security Options:
seccomp
Profile: default
Kernel Version: 3.10.0-862.11.6.el7.x86_64
Operating System: CentOS Linux 7 (Core)
OSType: linux
Architecture: x86_64
CPUs: 4
Total Memory: 11.56GiB
Name: ril-r0233343
ID: RLZ5:T3R4:4UDY:YX7J:OCX5:JGRM:YI3N:UTRA:MKG5:JOOS:6QME:XCQB
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Username: rayfes
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
Additional environment details (AWS, VirtualBox, physical, etc.):
cat /etc/centos-release
CentOS Linux release 7.5.1804 (Core)
Background:
Trying to connect my container to a windows server with 45 TB of video data. I don't have sudo rights. sambaclient doesn't fulfill my needs. Using fuse: gvfs-mount produces these weird looking mount points. There are no options in gvfs-mount to change those.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the documented --mount and -v commands with the comma-containing GVFS path and trace the Docker CLI parsing entry points for these flags. Done means a path containing an escaped comma is accepted without being split into an unintended mount option, with the existing error behavior preserved for invalid input.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, go
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100