in Dockerfile while copying file from target to webapps it gives error

I am trying to copy webapp in Dockerfile

COPY  /opt/javawar/target /opt/apache-tomcat-8.0.20/webapps/

But I got this error

error: COPY failed: stat /var/lib/docker/tmp/docker-builder791542850/opt/javawar/target: no such file or directory

Source: StackOverflow