Unable to exec any docker job locally from Windows 10 host (with Docker Toolbox)
Summary
Unable to execute whatsoever job locally from Windows 10 host when executor is docker (Docker Toolbox).
Steps to reproduce
.gitlab-ci.yml
image: alpine:3.10
test:
script:
- echo "Minimal failure"
Actual behavior
gitlab-runner exec docker test
Runtime platform arch=amd64 os=windows pid=11500 revision=a987417a version=12.2.0
Running with gitlab-runner 12.2.0 (a987417a)
ERROR: Job failed: invalid volume specification: "C:\\Users\\XXX\\repo:C:\\Users\\XXX\\repo:ro"
FATAL: invalid volume specification: "C:\\Users\\XXX\\repo:C:\\Users\\XXX\\repo:ro"
gitlab-runner exec docker --docker-volumes "//home/XXX/repo:/home/XXX/repo" test
ERROR: Job failed: invalid volume specification: "//home/XXX/repo:/home/XXX/repo"
FATAL: invalid volume specification: "//home/XXX/repo:/home/XXX/repo"
docker run -it --rm -v "//home/XXX/repo:/home/XXX/repo" "alpine:3.10" sh -c "cd /home/XXX/repo && tail -1 .gitlab-ci.yml"
- echo "Minimal failure"
Additionally:
- shell executor works fine
- docker executor works fine when job comes from Gitlab pipeline (gitlab-runner runs as a specific runner)
Expected behavior
Gitlab-runner job test succeed and output is Minimal failure.
Environment description
Machine setup:
- Windows 10 Home 1903 x64 (build 18 362)
- Docker Toolbox (19.03.1)
- VirtualBox 6.0.12
- docker default machine is setup with a permanent auto-mounted shared folder :
C:\Users\XXX→home/XXX
- docker default machine is setup with a permanent auto-mounted shared folder :
docker info
Client:
Debug Mode: false
Server:
Containers: 0
Running: 0
Paused: 0
Stopped: 0
Images: 1
Server Version: 18.09.9
Storage Driver: overlay2
Backing Filesystem: extfs
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 local logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 894b81a4b802e4eb2a91d1ce216b8817763c29fb
runc version: 425e105d5a03fabd737a126ad93d62a9eeede87f
init version: fec3683
Security Options:
seccomp
Profile: default
Kernel Version: 4.14.141-boot2docker
Operating System: Boot2Docker 18.09.9 (TCL 8.2.1)
OSType: linux
Architecture: x86_64
CPUs: 1
Total Memory: 989.4MiB
Name: default
ID: …
Docker Root Dir: /mnt/sda1/var/lib/docker
Debug Mode: false
Registry: https://index.docker.io/v1/
Labels:
provider=virtualbox
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
Product License: Community Engine
config.toml (unlike local execution, my registered gitlab-runner service works well as a specific runner over the Gitlab pipeline)
concurrent = 1
check_interval = 0
[session_server]
session_timeout = 1800
[[runners]]
name = "W10-XXX-PC"
url = "https://gitlab.com/"
token = "$TOKEN"
executor = "docker"
[runners.docker]
host = "tcp://...:2376"
tls_cert_path = "C:\\Users\\XXX\\.docker\\machine\\machines\\default"
tls_verify = true
image = "alpine:3.10"
privileged = false
disable_entrypoint_overwrite = false
oom_kill_disable = false
disable_cache = false
volumes = ["/cache"]
shm_size = 0
Used GitLab Runner version
Version: 12.2.0
Git revision: a987417a
Git branch: 12-2-stable
GO version: go1.8.7
Built: 2019-08-22T13:06:07+0000
OS/Arch: windows/amd64