0

According to boot2docker docs:

The first of the following share names that exists (if any) will be automatically mounted at the location specified:

  1. Users share at /Users
  2. /Users share at /Users
  3. c/Users share at /c/Users
  4. /c/Users share at /c/Users
  5. c:/Users share at /c/Users

In my case I can see an automount for c:/Users. However how do i push a war from c:/Users to the tomcat webapp folder on the VM created by boot2docker.

Abhinav
  • 1,911
  • 2
  • 13
  • 11

1 Answers1

0

Use -v <host-dir>:<container-dir> option in docker run to share a directory between boot2docker's filesystem and container's filesystem. E.g.:

docker run -v /Users:/war/folder tomcat

Javier Cortejoso
  • 8,851
  • 3
  • 26
  • 27
  • I am trying to run:docker run -it --rm -p 8080:8080 -v /C/Users/AbhinavG/tomdeploy:/usr/local/tomcat/webapps tomcat – Abhinav Feb 03 '15 at 14:05
  • And does it work? If not what are the symptoms? Any error message? – Javier Cortejoso Feb 03 '15 at 19:22
  • I have my war in the folder on windows system at : C/Users/AbhinavG/tomdeploy I try and push it to webapps folder using the command run:docker run -it --rm -p 8080:8080 -v /C/Users/AbhinavG/tomdeploy:/usr/local/tomcat/webapps tomcat however i can't access the localhost:8080 url. I get a 404. – Abhinav Feb 11 '15 at 17:38