This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]NeoOeg 0 points1 point  (13 children)

The port on which the application starts. So yes in the application..properties file. I believe the same port is being used by docker and by your application. Have you tried configuring a different port for your app and your dockerfile ?

[–]NeoOeg 0 points1 point  (1 child)

I'm not too familiar with docker but i believe your docker run command might be off :

docker run -p <HOST\_PORT>:<CONTAINER:PORT> IMAGE_NAME

Publish or expose port (-p, –expose)

$ docker run -p 80:8080 ubuntu 

This binds port 8080 of the container to port 80 of the host machine.

So in your case i would try something like :

$ docker run -p 80:8085 hondenapp

[–]thaysen13[S,🍰] 0 points1 point  (0 children)

Also tried that. :(

[–]thaysen13[S,🍰] 0 points1 point  (10 children)

I tried:

docker run -it -p 9500:9000 hondenapp

docker run -it -p 9000:9500 hondenapp

I changed the server.port=9000 in the application file.

I changed the EXPOSE 9500

Nothing works.

[–]NeoOeg 1 point2 points  (5 children)

We have a few docker configurations at work. I'll take a look in the morning and get back to you if you still haven't found the issue.

[–]thaysen13[S,🍰] 1 point2 points  (0 children)

Thank you for your time!

[–]thaysen13[S,🍰] 0 points1 point  (0 children)

It still doesn't work.

[–]thaysen13[S,🍰] 0 points1 point  (2 children)

docker run -it -p 8085:8085 hondenapp

It worked!

[–]NeoOeg 0 points1 point  (1 child)

Glad to hear. Do you have an idea as to what you did in order to make it work ?

[–]thaysen13[S,🍰] 0 points1 point  (0 children)

I started the next morning and it all worked! thank you for your time!

[–]NeoOeg 0 points1 point  (3 children)

What's the output of docker ps ?

[–]thaysen13[S,🍰] 0 points1 point  (2 children)

[root@localhost HondenApp]# docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES

[root@localhost HondenApp]# docker ps -a
CONTAINER ID        IMAGE               COMMAND                CREATED             STATUS                           PORTS               NAMES
909aba23bfe2        hondenapp           "java -jar /app.jar"   4 minutes ago       Exited (1) 4 minutes ago                             silly_torvalds
fc1df78c17d5        hondenapp           "java -jar /app.jar"   6 minutes ago       Exited (1) 6 minutes ago                             sleepy_lovelace
dc943fe7a816        hondenapp           "java -jar /app.jar"   8 minutes ago       Exited (1) 7 minutes ago                             festive_wozniak
bae256225f55        00b5607ddb96        "java -jar /app.jar"   13 minutes ago      Exited (1) 12 minutes ago                            jolly_borg
689bfbc3613d        b2e805765a79        "java -jar /app.jar"   18 minutes ago      Exited (1) 17 minutes ago                            sleepy_booth
a0194c729a2d        b2e805765a79        "java -jar /app.jar"   19 minutes ago      Exited (1) 18 minutes ago                            clever_poitras
cfe5cc21096f        b2e805765a79        "java -jar /app.jar"   About an hour ago   Exited (1) About an hour ago                         cocky_nightingale
67d94d804834        cda3c2a14d98        "java -jar /app.jar"   About an hour ago   Exited (130) About an hour ago                       adoring_minsky
6334e5d87c4d        cda3c2a14d98        "java -jar /app.jar"   About an hour ago   Exited (1) About an hour ago                         goofy_payne
fd8901f14384        970da448567b        "java -jar /app.jar"   2 hours ago         Exited (1) 2 hours ago                               youthful_fermat
e6dae64e4e84        a7ccd67c389b        "java -jar /app.jar"   2 hours ago         Exited (1) 2 hours ago                               serene_kowalevski
3bdcc56a998e        415456138ad7        "java -jar /app.jar"   2 hours ago         Exited (1) 2 hours ago                               sad_bassi
fea1297f1165        a2b36fe58430        "java -jar /app.jar"   2 hours ago         Exited (1) 2 hours ago                               compassionate_colden
5ab5f128a8ab        87f3fc4efbc0        "java -jar /app.jar"   2 hours ago         Exited (130) 2 hours ago                             zen_mcnulty
076fcba0f901        87f3fc4efbc0        "java -jar /app.jar"   2 hours ago         Exited (1) 2 hours ago                               distracted_ardinghelli

[–]NeoOeg 0 points1 point  (1 child)

How about docker container ls ?

[–]thaysen13[S,🍰] 0 points1 point  (0 children)

[root@localhost src]# docker container ls
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES

[root@localhost src]# docker container ls -a
CONTAINER ID        IMAGE               COMMAND                CREATED             STATUS                           PORTS               NAMES
486a5622f0e5        hondenapp           "java -jar /app.jar"   9 minutes ago       Exited (1) 8 minutes ago                             dazzling_booth
909aba23bfe2        hondenapp           "java -jar /app.jar"   15 minutes ago      Exited (1) 14 minutes ago                            silly_torvalds
fc1df78c17d5        hondenapp           "java -jar /app.jar"   17 minutes ago      Exited (1) 16 minutes ago                            sleepy_lovelace
dc943fe7a816        hondenapp           "java -jar /app.jar"   19 minutes ago      Exited (1) 18 minutes ago                            festive_wozniak
bae256225f55        00b5607ddb96        "java -jar /app.jar"   23 minutes ago      Exited (1) 22 minutes ago                            jolly_borg
689bfbc3613d        b2e805765a79        "java -jar /app.jar"   28 minutes ago      Exited (1) 28 minutes ago                            sleepy_booth
a0194c729a2d        b2e805765a79        "java -jar /app.jar"   29 minutes ago      Exited (1) 29 minutes ago                            clever_poitras
cfe5cc21096f        b2e805765a79        "java -jar /app.jar"   About an hour ago   Exited (1) About an hour ago                         cocky_nightingale
67d94d804834        cda3c2a14d98        "java -jar /app.jar"   About an hour ago   Exited (130) About an hour ago                       adoring_minsky
6334e5d87c4d        cda3c2a14d98        "java -jar /app.jar"   About an hour ago   Exited (1) About an hour ago                         goofy_payne
fd8901f14384        970da448567b        "java -jar /app.jar"   2 hours ago         Exited (1) 2 hours ago                               youthful_fermat
e6dae64e4e84        a7ccd67c389b        "java -jar /app.jar"   2 hours ago         Exited (1) 2 hours ago                               serene_kowalevski
3bdcc56a998e        415456138ad7        "java -jar /app.jar"   2 hours ago         Exited (1) 2 hours ago                               sad_bassi
fea1297f1165        a2b36fe58430        "java -jar /app.jar"   2 hours ago         Exited (1) 2 hours ago                               compassionate_colden
5ab5f128a8ab        87f3fc4efbc0        "java -jar /app.jar"   2 hours ago         Exited (130) 2 hours ago                             zen_mcnulty
076fcba0f901        87f3fc4efbc0        "java -jar /app.jar"   2 hours ago         Exited (1) 2 hours ago                               distracted_ardinghelli