Home >Java >javaTutorial >How to deploy springBoot project to Docker on Mac

How to deploy springBoot project to Docker on Mac

WBOY
WBOYforward
2023-05-16 08:58:131434browse

Operation process

Local deployment

Install and start docker on mac.

clone project:, and then execute in sequence:

 docker build -t docker-demo ../docker-demo

and

 docker run -d -p 8080:8080 docker-demo

Online deployment

Take centos as an example, online The deployment examples above may not be explained clearly below. I will update them in time after sorting out the examples. If you have any questions, please leave a message.

  • centos Install docker container service

  • Push the locally deployed docker-demo image to the centos docker container service.

  • Using docker's image service, you can directly use the docker command locally to operate the docker image on centos.

Result graph

How to deploy springBoot project to Docker on Mac

The above is the detailed content of How to deploy springBoot project to Docker on Mac. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:yisu.com. If there is any infringement, please contact admin@php.cn delete