Springboot packaged microservice image

After packaging the project, create a Dockerfile file, write the command,
Insert picture description here
put the dockerfile and jar package on the server, and
Insert picture description here
make a package

docker build -t docker666 .

Insert picture description here
Run this image

docker run -d -p 8080:8080 --name handsomehuang666666 huang66

Visit this address

curl localhost:8080/hello

Insert picture description here
Get the return result

Guess you like

Origin blog.csdn.net/qq_45432665/article/details/114270279