In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
Docker is an open source application container engine that packages applications and dependencies into a portable image, deploys to a server and runs in a Container container instance.
When building a Docker image, you need to run the mvn package packaged Spring Boot project. Does it take a long time to download dependent libraries? Share an ingenious solution.
The configuration of Dockerfile is the core.
Dockerfile is a mirror description file that contains instructions, each of which builds a layer, so the content of each instruction is to describe how the layer should be built. Basic structure of Dockerfile:
-basic image
-maintainer information
-Image build instruction
-execute instructions when the container starts
When building a Docker image, in order to solve the problem that mvn downloads dependent libraries slowly and takes a long time, the construction process is divided into two steps:
1) in order to trigger the mvn download dependency library, Dockerfile_base builds an empty Spring Boot project in about 10 minutes, with few changes during the project cycle, and only needs to maintain pom.xml
2) Dockerfile relies on Dockerfile_base to pull the source code and compile and package the jar file. It takes about 3 minutes to build a Docker image every time the code is updated, which is very fast.
2. Add Dockerfile_ce Community Edition
Depending on the local development environment, the compiled project running files are packaged into the Docker image, which are mostly used for local development testing and rapid construction.
Download instance Dockerfile: https://github.com/jextop/StarterDeploy
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.