I have a spring boot application and I created dockerfile like this one :
FROM java:8
EXPOSE 80
ADD /target/test-server.jar test-server.jar
ENTRYPOINT ["java","-jar","test-server.jar"]
Next I follow these steps :
docker build -t test-server .
docker run -p 8888:80 -t test-server
and it works but on port 8080 , which is default to tomcat. I want it to run on 8888
Results from docker ps
3debfb5a9084 test-server "java -jar test-ser" About a minute ago Up About a minute 0.0.0.0:8888->80/tcp thirsty_euclid
Btw, why it shows test-ser rather than test-server ?
Generally, I want to be able to run this server on few different ports
Result from command
nmap -A -p8080,8888 localhost
is
Starting Nmap 7.12 ( https://nmap.org ) at 2016-12-05 20:49 CET
Nmap scan report for localhost (127.0.0.1)
Host is up (0.000059s latency).
PORT STATE SERVICE VERSION
8080/tcp closed http-proxy
8888/tcp open tcpwrapped
Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 5.45 seconds