404 NOT FOUND - with docker image
demourarosa38 opened this issue ยท 12 comments
After pull a new image of tomcat, the server does not start.
I solved the problem by renaming webapps.dist to webapps.
So, the doc on docker hub should be updated, because after run the container you can't visit de homepage.
When i read this:
How to use this image.
Run the default Tomcat server (CMD ["catalina.sh", "run"]):
$ docker run -it --rm tomcat:8.0
You can test it by visiting
My test is unsuccessful.
$ docker run -d --rm --name tomcat tomcat:8.0
c9731f7c300653ebcb8edc7d238d0a51a4c20a5ae5cd88a6fcdf4d53ae2ce149
$ docker inspect tomcat | grep -i address
"LinkLocalIPv6Address": "",
"SecondaryIPAddresses": null,
"SecondaryIPv6Addresses": null,
"GlobalIPv6Address": "",
"IPAddress": "172.17.0.3",
"MacAddress": "02:42:ac:11:00:03",
"IPAddress": "172.17.0.3",
"GlobalIPv6Address": "",
"MacAddress": "02:42:ac:11:00:03",
$ curl 172.17.0.3:8080 2>/dev/null | head
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Apache Tomcat/8.0.53</title>
<link href="favicon.ico" rel="icon" type="image/x-icon" />
<link href="favicon.ico" rel="shortcut icon" type="image/x-icon" />
Following the documentation above works for me as well. The 404 response is due to the default webapps being removed in #181. The only amendment I'd suggest for the docs is that we drive users to Tomcat 9.0 instead of an EOL version (8.0) :)
Agreed, very good point -- I do think there's value in pointing out that we're no longer including the default webapps though, so I've updated both over in docker-library/docs#1637. ๐
Awesome, thanks @tianon :D I was going to submit that yesterday, but got tied up.
After pull a new image of tomcat, the server does not start.
I solved the problem by renaming webapps.dist to webapps.
it worked for me thank you...!! but can you explain how this rename fixed the issue
After pull a new image of tomcat, the server does not start.
I solved the problem by renaming webapps.dist to webapps.it worked for me thank you...!! but can you explain how this rename fixed the issue
Because the new image put the tomcat server in webapps.dist directory but try to start with webapps directory.
I realised the problem is not in all docker image, also the target tomcat:8.5-jdk8 i tried.
I finally create a new docker image for me, with symbolic link, like:
`
FROM tomcat:8.5-jdk8
RUN ln -s /usr/local/tomcat/webapps.dist/manager webapps/manager
RUN ln -s /usr/local/tomcat/webapps.dist/host-manager webapps/host-manager
RUN ln -s /usr/local/tomcat/webapps.dist/ROOT webapps/ROOT
CMD ["catalina.sh", "run"]
`
docker pull tomcat:latest
docker run -d --name mytomcat -p 8080:8080 tomcat:latest
docker exec -it mytomcat /bin/bash
mv webapps webapps2
mv webapps.dist/ webapps
exit
http://host:8080
Test successful !
150411100 Thanks man ...its working fine now ...good recommendation...!!!
After pull a new image of tomcat, the server does not start.
I solved the problem by renaming webapps.dist to webapps.
Hi how can I rename it?
See #181 (comment) for one concrete example of how to accomplish that.
For further assistance, these sorts of questions/requests would be more appropriately posted to the Docker Community Forums, the Docker Community Slack, or Stack Overflow.