I have raised this question about Docker for windows 7.
As explained in the question in the link, I have tried basic example with springboot.
I have made some of the below changes on top of what I have explained.
- I made changes to application.properties to have server.port=8080
- I have made changes to Dockerfile
FROM openjdk:8-jdk-alpine
VOLUME /tmp
EXPOSE 8080
ADD target/spring-docker-01.jar spring-docker-01.jar
ENTRYPOINT [“java”,"-Djava.security.egd=file:/dev/./urandom","-jar","/spring-docker-01.jar"]
-
I have also tried to make changes to docker run command:
docker run -p 8080:8080 --name app01 -d imagename -
container gets created successfully.
But when I try to go to http://localhost:8080/hello
I am getting error message as :
This site can’t be reached localhost refused to connect. Search Google for localhost 8082 hello ERR_CONNECTION_REFUSED