Home >Java >javaTutorial >How to deploy springboot project to docker in idea
1. Idea to install docker plug-in
1. Installation
vim /lib/systemd/system/docker.serviceModify as follows
FROM java:8 VOLUME /tmp ADD /target/sso_test-0.0.1-SNAPSHOT.jar sso_test.jar EXPOSE 9999 ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-jar","/sso_test.jar"]The format is FROM
VOLUME
The format is VOLUME ["/data"]. Create a mount point that can be mounted from the local host or other containers. It is generally used to store databases and data that need to be maintained.ADD
The format is ADDEXPOSE
The format is EXPOSEENTRYPOINT
Two formats:Each Dockerfile can only have one ENTRYPOINT. When multiple are specified, only the last one will take effect.
Remarks:
To learn about Dockerfile, please move to----Dockerfile Introduction
Docker Chinese Manual-----Docker Chinese Manual
Deployment
The above is the detailed content of How to deploy springboot project to docker in idea. For more information, please follow other related articles on the PHP Chinese website!