In my Dockerfile
I've got :
ADD ../../myapp.war /opt/tomcat7/webapps/
That file exists as ls ../../myapp.war
returns me the correct file but when I execute sudo docker build -t myapp .
I've got :
Step 1 : ADD ../../myapp.war /opt/tomcat7/webapps/
2014/07/02 19:18:09 ../../myapp.war: no such file or directory
Does somebody know why and how to do it correctly?
cd
to your parent directory insteaddocker build -t <some tag> -f <dir/dir/Dockerfile> .
In this case, the context of the docker will be switched to the parent directory and accessible for ADD and COPY