In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article will explain in detail about the deployment of a springboot project in Dockerfile, the content of the article is of high quality, so the editor will share it with you for reference. I hope you will have some understanding of the relevant knowledge after reading this article.
Write the Dockerfile file FROM openjdk:8-jre-alpineMAINTAINER projectNameENV PARAMS= "" # add it locally, if you need to put the jar package inside the container You need to add the line # ADD target/isafe-admin.jar / admin.jar# time zone RUN ln-sf / usr/share/zoneinfo/Asia/Shanghai / etc/localtimeRUN echo 'Asia/Shanghai' > / etc/timezone#ENTRYPOINT ["java", "- jar", "$PARAMS / admin.jar"] ENTRYPOINT ["sh", "- c", "java-jar/ home/jar/admin.jar-- spring.profiles.active=pro $PARAMS"] run the docker command docker build-t admin:v1 under the Dockerfile file directory.
Notice that there is one last point
After running successfully, it will already be available in images.
Start mirroring
Put the jar package of springboot in the host / home/test directory
Docker run-d-p18081 name webadmin admin:v1 8081-v / home/test:/home/jar-- name webadmin admin:v1 / bin/bash check the log docker logs-f-- tail 20 admin:v1 on the deployment of a springboot project in Dockerfile to share here, I hope the above content can be helpful to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.