I have created a spring-boot application, when build and run it using maven it was working success full. But when i ran docker of my app it was running in the console but i can't access any REST endpoint browser is giving page not found error.
here is the content of my Dockerfile
FROM java:8
EXPOSE 5555:5555
ADD /hotline-api/target/hotline-api.jar hotline-api.jar
ENTRYPOINT ["java","-jar","hotline-api.jar","--spring.profiles.active=test"]
You also need to publish the port while running your image
docker run -p 5555:5555 IMAGE_NAME
Make sure you also expose the same port from your properties
file based on your profile (default/dev/test).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With