I am new to docker. I have installed docker using Boot2docker on my windows. But I do not have clear idea how to deploy simple java web app in docker.
I have gone through the net and came to know that from docker file create build an image and run it.
I created one dockerfile
and placed in D:\dock
folder.
I ran docker build
command like this i.e
$ docker build -t tomcat7-test Dockerfile's path.
But it did not recognize my file.
Where should be my Dockerfile
should exist if I create through notepad++
and how docker recognize my docker file with docker build command?
Your Dockerfile should be copied into boot2docker VM in order to run it. You can do one of the following:
How to add shared folder into boot2docker VM:
VBoxManage.exe sharedfolder add boot2docker-vm --name /c/Users --hostpath C:/Users --automount
By using option 2 you can edit Dockerfile from your home directory and run docker on the same Dockerfile (replace the example with a real path to Dockerfile):
docker build -t myimage /c/Users/xyz