In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-20 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
Most people do not understand the knowledge points of this article "how to deploy the springboot project to docker in idea", so the editor summarizes the following content, detailed content, clear steps, and has a certain reference value. I hope you can get something after reading this article. Let's take a look at this article "how to deploy the springboot project to docker in idea".
Idea installs the docker plug-in
1. Installation
2. Configuration
Note: for docker to be accessible through port 2375, you need to configure docker
Vim / lib/systemd/system/docker.service
Modify as follows
3. Configure the container
Dockerfile file (for convenience here, put the Dockerfile file under the root directory)
FROM java:8VOLUME / tmpADD / target/sso_test-0.0.1-SNAPSHOT.jar sso_test.jarEXPOSE 9999ENTRYPOINT ["java", "- Djava.security.egd=file:/dev/./urandom", "- jar", "/ sso_test.jar"]
The format is FROM or FROM:.
The first instruction must be a FROM instruction. Also, if you create multiple mirrors in the same Dockerfile, you can use multiple FROM instructions (one for each mirror).
VOLUME
The format is VOLUME ["/ data"].
Create a mount point that can be mounted from a local host or other container, which is generally used to store databases, data that needs to be maintained, and so on.
ADD
The format is ADD.
This command copies the specified to the container. It can be a relative path to the directory where Dockerfile is located, a URL; or a tar file (which is automatically extracted to a directory).
EXPOSE
The format is EXPOSE [...].
Tell the port number exposed by the Docker server container for use by the interconnected system. When starting the container, the host will automatically assign a port to be forwarded to the specified port through-P _ ~ ~ Docker.
ENTRYPOINT
There are two formats:
ENTRYPOINT ["executable", "param1", "param2"]
ENTRYPOINT command param1 param2 (executed in shell)
Configure the commands that are executed after the container starts and cannot be overridden by the parameters provided by docker run.
There can be only one ENTRYPOINT per Dockerfile, and when more than one is specified, only the last one takes effect.
Note:
For more information about Dockerfile, please go to-introduction to Dockerfile
Docker Chinese Manual-Docker Chinese Manual
Deployment
The above is about the content of this article on "how to deploy the springboot project to docker in idea". I believe we all have some understanding. I hope the content shared by the editor will be helpful to you. If you want to know more about the relevant knowledge, please follow the industry information channel.
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.