0

I run my application in my host.

java -jar docker-spring-boot.war


 http://localhost:8083/

On the browser, it works fine.

In the docker container, it didn't work.

 docker run docker-spring-boot -p 8083:8083

 http://localhost:8083/
 http://192.168.99.100:8083/

I have this message:

This site is inaccessible

Dockerfile

FROM openjdk:8-jdk-alpine
EXPOSE 8083
ADD target/docker-spring-boot.war docker-spring-boot.war
ENTRYPOINT ["java","-jar","/docker-spring-boot.war"]

Have you an idea about the solution ?

Marko E
  • 13,362
  • 2
  • 19
  • 28
  • How come you run `-jar file.war`? – Giorgi Tsiklauri Aug 24 '20 at 21:09
  • java -jar docker-spring-boot.war . ____ _ __ _ _ /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \ ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \ \\/ ___)| |_)| | | | | || (_| | ) ) ) ) ' |____| .__|_| |_|_| |_\__, | / / / / =========|_|==============|___/=/_/_/_/ :: Spring Boot :: (v2.3.3.RELEASE) – Thouraya Louati Aug 24 '20 at 21:38
  • Have you checked the docker logs of that container? Any errors in them? – Wander3r Aug 25 '20 at 02:57

0 Answers0