Hello everyone.
I’m begginer using docker on Ubuntu 18 and i have my first question:
Currently I have some volumes mounted in docker where if I need to access your files internally I just use the following command:
docker container exec -it ‘service’ bash
But I’d like to access those volumes remotely. I would like to know if this is possible like for example using a Tomcat where I want to upload my application doing deploy by FTP.
And worked very well. I was able to upload files on /My/HTMLdir directory and it was applied also inside /var/apache/html/.
But my real request is upload files inside this directory /usr/local/tomcat/webapps. This directory i can auto deploy application on Tomcat. So i tried to start my docker using the next command:
But my Tomcat wasn’t able to access the Manager. Probably because /usr/local/tomcat/webapps isn’t the main directory of Tomcat, right? What can i do about this?
my guess is that the webapps are not in the local directory /Kvra/DeployTomcat directory already and the files that are part of apache in that container directory are not visable when you replace the /usr/local/tomcat/webapps folder.
You can try to this
docker run -d -p 8080:8080 --restart always --name tomcat -it -v /My/tempstore:/tempstore tomcat:9.0
then docker exec into the container
copy /usr/local/tomcat/webapps to /my/tempstore
then copy temptore files to /Kvra/DeployTomcat
then run
docker run -d -p 8080:8080 --restart always --name tomcat -it -v /Kvra/DeployTomcat:/usr/local/tomcat/webapps tomcat:9.0
Hi Don,
I already deleted my first container to not make any conflicts with your new commands but how can i run the bellow command if i already created another container with your first command? --> docker run -d -p 8080:8080 --restart always --name tomcat -it -v /My/tempstore:/tempstore tomcat:9.0
docker: Error response from daemon: Conflict. The container name “/tomcat” is already in use by container “ce7fe4aeb5aae7c4958b877b23fd6f28e2313e79def85b3c295961d1d7146d0a”. You have to remove (or rename) that container to be able to reuse that name.
See ‘docker run --help’.
Hi Don,
I’m sorry!! The answer was i front of me.
The issue was exctly about the webapps are not in the local directory /Kvra/DeployTomcat directory already and the files that are part of apache in that container directory are not visable when you replace the /usr/local/tomcat/webapps folder.
So i just copied all the files inside this folder and mounted the container again.
Thanks a lot for your help!