https://www.jetbrains.com/help/idea/docker.html
Create a new dockerfile file
such as
FROM java:8u111
VOLUME /tmp
MAINTAINER Hex Jeryson <[email protected]>
EXPOSE 8090
ADD /app.jar app.jar
ENTRYPOINT ["java","-jar","app.jar"]
New run configuration
In particular, you need to add the packaging command before
startup. For how to connect to docker, please Baidu by yourself and add the open port option in the docker startup script.