I am running a tomcat container on katacoda. I want to copy my application’s war file into the webapps directory of the container. The war file is present in my local machine. How do I copy a file from my local machine to a container on katacoda.
through docker copy command.
Thank you for your reply… the docker cp command is not helping as the file I want to copy is present in my local machine, how can I access the file from katacoda. On running the docker cp (path of war file on my laptop) (container name):/usr/local/tomcat/webapps
command on katacoda the following error shows up :
copying between containers is not supported
You can create the volume as below :
docker volume create (path of war file on your laptop)
docker run -v (path of war file on your laptop):/usr/local/tomcat/webapps <container>
The mount is created inside the container’s /usr/local/tomcat/webapps directory and all your configurations for the application will be saved inside your host and vise-versa .
Hope this helps!