Discussion:
[vagrant-up] Vagrant Docker Provider - Windows Volumes
Jamie Jackson
2018-02-22 00:31:29 UTC
Permalink
Vagrant seems to be trying to manipulate my local path, for some reason:

Vagrantfile snippet:

config.vm.define "centos-jenkins" do |c|
c.vm.provider "docker" do |d|
d.name = "centos-jenkins2"
d.image = "jenkins/jenkins:2.91-alpine"
d.ports = ["9898:8080"]
d.volumes =
['/c/Users/15037/workspace/centos-vagrant-fresh:/var/jenkins_home']
end
end


Output:


Command: ["docker", "run", "--name", "centos-jenkins2", "-d", "-p",
"9898:8080", "-v",
"c\\Users\\15037\\workspace\\centos-vagrant-fresh:/var/jenkins_home",
"jenkins/jenkins:2.91-alpine", {:notify=>[:stdou
t, :stderr]}]

Stderr: C:\Program Files\Docker Toolbox/docker.EXE: Error response from
daemon: create c\Users\15037\workspace\centos-vagrant-fresh:
"c\\Users\\15037\\workspace\\centos-vagrant-fresh" includes invalid
characters for a local volume name, only "[a-zA-Z0-9][a-zA-Z0-9_.-]" are
allowed. If you intended to pass a host directory, use absolute path.
See 'C:\Program Files\Docker Toolbox/docker.EXE run --help'.


How can I get it to leave my path alone? (It works fine from a straight
`docker run`.)
--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/CA%2BonWPcDHWLTE83ueWYM6Ec4q99yghv2KNDecMB%2Bm%3D8F%3DJ8VYg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Jamie Jackson
2018-02-22 21:38:50 UTC
Permalink
For now, I'm hacking Vagrant:


---
/cygdrive/c/HashiCorp/Vagrant/embedded/gems/gems/vagrant-2.0.2/plugins/providers/docker/driver.orig.rb
2018-02-22
13:11:00.934731600 -0500

+++
/cygdrive/c/HashiCorp/Vagrant/embedded/gems/gems/vagrant-2.0.2/plugins/providers/docker/driver.rb
2018-02-22
13:01:42.703345200 -0500

@@ -48,7 +48,7 @@

run_cmd += ports.map { |p| ['-p', p.to_s] }

run_cmd += volumes.map { |v|

v = v.to_s

- if false v.include?(":") && @executor.windows?

+ if false && v.include?(":") && @executor.windows?

host, guest = v.split(":", 2)

host = Vagrant::Util::Platform.windows_path(host)

# NOTE: Docker does not support UNC style paths (which also
Post by Jamie Jackson
config.vm.define "centos-jenkins" do |c|
c.vm.provider "docker" do |d|
d.name = "centos-jenkins2"
d.image = "jenkins/jenkins:2.91-alpine"
d.ports = ["9898:8080"]
d.volumes = ['/c/Users/15037/workspace/centos-vagrant-fresh:/var/
jenkins_home']
end
end
Command: ["docker", "run", "--name", "centos-jenkins2", "-d", "-p",
"9898:8080", "-v", "c\\Users\\15037\\workspace\\centos-vagrant-fresh:/var/jenkins_home",
"jenkins/jenkins:2.91-alpine", {:notify=>[:stdou
t, :stderr]}]
Stderr: C:\Program Files\Docker Toolbox/docker.EXE: Error response from
"c\\Users\\15037\\workspace\\centos-vagrant-fresh" includes invalid
characters for a local volume name, only "[a-zA-Z0-9][a-zA-Z0-9_.-]" are
allowed. If you intended to pass a host directory, use absolute path.
See 'C:\Program Files\Docker Toolbox/docker.EXE run --help'.
How can I get it to leave my path alone? (It works fine from a straight
`docker run`.)
--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/CA%2BonWPcxMBvn%2Ba6EGzFpAUNMkXdouXFS-swBmFihFzPC9q6Fig%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Jamie Jackson
2018-02-22 23:36:15 UTC
Permalink
Post by Jamie Jackson
config.vm.define "centos-jenkins" do |c|
c.vm.provider "docker" do |d|
d.name = "centos-jenkins2"
d.image = "jenkins/jenkins:2.91-alpine"
d.ports = ["9898:8080"]
d.volumes =
['/c/Users/15037/workspace/centos-vagrant-fresh:/var/jenkins_home']
end
end
Command: ["docker", "run", "--name", "centos-jenkins2", "-d", "-p",
"9898:8080", "-v", "c\\Users\\15037\\workspace\\centos-vagrant-fresh:/var/jenkins_home",
"jenkins/jenkins:2.91-alpine", {:notify=>[:stdou
t, :stderr]}]
Stderr: C:\Program Files\Docker Toolbox/docker.EXE: Error response from
"c\\Users\\15037\\workspace\\centos-vagrant-fresh" includes invalid
characters for a local volume name, only "[a-zA-Z0-9][a-zA-Z0-9_.-]" are
allowed. If you intended to pass a host directory, use absolute path.
See 'C:\Program Files\Docker Toolbox/docker.EXE run --help'.
How can I get it to leave my path alone? (It works fine from a straight
`docker run`.)
--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/1581532e-fb3d-4ce7-9d85-138330955503%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Alvaro Miranda Aguilera
2018-02-24 10:59:50 UTC
Permalink
developers saw your message and they are thinking

feel free to open an issue on github
Post by Jamie Jackson
Post by Jamie Jackson
config.vm.define "centos-jenkins" do |c|
c.vm.provider "docker" do |d|
d.name = "centos-jenkins2"
d.image = "jenkins/jenkins:2.91-alpine"
d.ports = ["9898:8080"]
d.volumes = ['/c/Users/15037/workspace/cen
tos-vagrant-fresh:/var/jenkins_home']
end
end
Command: ["docker", "run", "--name", "centos-jenkins2", "-d", "-p",
"9898:8080", "-v", "c\\Users\\15037\\workspace\\centos-vagrant-fresh
:/var/jenkins_home", "jenkins/jenkins:2.91-alpine", {:notify=>[:stdou
t, :stderr]}]
Stderr: C:\Program Files\Docker Toolbox/docker.EXE: Error response from
"c\\Users\\15037\\workspace\\centos-vagrant-fresh" includes invalid
characters for a local volume name, only "[a-zA-Z0-9][a-zA-Z0-9_.-]" are
allowed. If you intended to pass a host directory, use absolute path.
See 'C:\Program Files\Docker Toolbox/docker.EXE run --help'.
How can I get it to leave my path alone? (It works fine from a straight
`docker run`.)
--
This mailing list is governed under the HashiCorp Community Guidelines -
https://www.hashicorp.com/community-guidelines.html. Behavior in
violation of those guidelines may result in your removal from this mailing
list.
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an
To view this discussion on the web visit https://groups.google.com/d/
msgid/vagrant-up/1581532e-fb3d-4ce7-9d85-138330955503%40googlegroups.com
<https://groups.google.com/d/msgid/vagrant-up/1581532e-fb3d-4ce7-9d85-138330955503%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
Alvaro
--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/CAHqq0ex8v%3DH5FqjbZSZo96zTzBXFxuY8i%2BdefVkP96tHoHkDzQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Jamie Jackson
2018-10-08 20:40:59 UTC
Permalink
I guess I forgot about this thread. I've just added an
issue: https://github.com/hashicorp/vagrant/issues/10274

On Saturday, February 24, 2018 at 5:59:57 AM UTC-5, Alvaro Miranda Aguilera
Post by Alvaro Miranda Aguilera
developers saw your message and they are thinking
feel free to open an issue on github
Post by Jamie Jackson
Post by Jamie Jackson
config.vm.define "centos-jenkins" do |c|
c.vm.provider "docker" do |d|
d.name = "centos-jenkins2"
d.image = "jenkins/jenkins:2.91-alpine"
d.ports = ["9898:8080"]
d.volumes =
['/c/Users/15037/workspace/centos-vagrant-fresh:/var/jenkins_home']
end
end
Command: ["docker", "run", "--name", "centos-jenkins2", "-d", "-p",
"9898:8080", "-v", "c\\Users\\15037\\workspace\\centos-vagrant-fresh:/var/jenkins_home",
"jenkins/jenkins:2.91-alpine", {:notify=>[:stdou
t, :stderr]}]
Stderr: C:\Program Files\Docker Toolbox/docker.EXE: Error response from
"c\\Users\\15037\\workspace\\centos-vagrant-fresh" includes invalid
characters for a local volume name, only "[a-zA-Z0-9][a-zA-Z0-9_.-]" are
allowed. If you intended to pass a host directory, use absolute path.
See 'C:\Program Files\Docker Toolbox/docker.EXE run --help'.
How can I get it to leave my path alone? (It works fine from a straight
`docker run`.)
--
This mailing list is governed under the HashiCorp Community Guidelines -
https://www.hashicorp.com/community-guidelines.html. Behavior in
violation of those guidelines may result in your removal from this mailing
list.
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups
"Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an
To view this discussion on the web visit
https://groups.google.com/d/msgid/vagrant-up/1581532e-fb3d-4ce7-9d85-138330955503%40googlegroups.com
<https://groups.google.com/d/msgid/vagrant-up/1581532e-fb3d-4ce7-9d85-138330955503%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
Alvaro
--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/b170229e-9f62-47ae-8923-f9e8b4d12270%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...