I use docker-compose up to start a container, and then use docker ps to display its info, I see the PORTS part is as below
0.0.0.0:2280->2280/tcp, 0.0.0.0:7000->7000/tcp, 8080/tcp
the 8080 is unexpected. the image-building Dockerfiles is:
FROM tomcat
MAINTAINER tol <etol@126.com>
RUN apt-get update && apt-get install vim -y \
&& mkdir -p /data/appdatas/cat \
&& cd /usr/local/tomcat/webapps && rm -rf docs examples \
&& touch ~/.vimrc && echo "set mouse-=a" > ~/.vimrc && . ~/.vimrc
COPY server.xml /usr/local/tomcat/conf
COPY datasource.xml client.xml /data/appdatas/cat/
COPY cat.war /usr/local/tomcat/webapps
there is no "8080" in server.xml, datasource.xml and client.xml, which are used in cat.war, so they are irrelevant
the docker-compose.xml is as below:
version: "2"
services:
pica-cat3:
container_name: pica-cat3
image: pica-cat3:latest
ports:
- 7000:7000
- 2280:2280
volumes:
- /opt/cat-logs:/data/applogs/cat
- /root/cat3/datasource.xml:/data/appdatas/cat/datasource.xml
- /root/cat3/client.xml:/data/appdatas/cat/client.xml
- /root/cat3/server.xml:/usr/local/tomcat/conf/server.xml
command: /bin/sh -c '/usr/local/tomcat/bin/catalina.sh run'
when I enter the container using docker exec -it CONTAINER_ID bash, and execute netstat -nlp, there is no 8080 either,
my question is, how is 8080 in the PORTS part?