Built a simple SpringBoot project in Docker .
-
first of all , you need to star the project , than download and run Docker on your local system .
My local operation system is MacOS
For how to use Docker on Mac , plz read My blog : MacOS安装Docker
-
built project by run command :
docker build -t docker-demo ../docker-demo
-
start project by run command :
docker run -d -p 8080:8080 docker-demo
than you can see this in your docker pannel:
-
open your browser and visite :
http://127.0.0.1:8080
-
You can view Dockerfile's syntax in here.
And this is quite necessary .