1. Click Terminal below in IDEA and enter mvn clean install When the following figure appears, it indicates success (the premise is that Maven must be installed locally and the Maven environment variables must be configured) The packaged jar is in the target directory 2. Then create a new Dockerfile file with the following content 3. Build the image: Place the Dockerfile and project jar package in the same directory on the server, and then enter the directory Enter: docker build -t app . (note there is a dot at the end, app is the custom image name) to build the image Check if the image exists: docker images 4. Run the image just created: docker run -d -p 8888:8081 --name app app illustrate: -d runs the container in the background; --name specifies the container name; -p specifies the port where the service runs (the first one is the host mapping port number, and the second one is the project port number) Open the browser IP:8888 to view 5. View container logs: docker logs -f -t --tail 500 app The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM. You may also be interested in:
|
<<: Detailed explanation of mysql transaction management operations
>>: JavaScript Objects (details)
1. Inner Join Query Overview Inner join is a very...
ChunkFive Free Typefamily Cuprum JAH I Free font Y...
Table of contents Preface text 1. Closure 1.1 Wha...
Table of contents Preface 1. Routing lazy loading...
HTML+CSS+JS imitates win10 brightness adjustment ...
Scenario Suppose there are 10 requests, but the m...
SRIOV introduction, VF pass-through configuration...
Nginx supports three ways to configure virtual ho...
Table of contents 1. Introduction 2. Simple defin...
In general, MySQL provides a variety of storage e...
Preface Sometimes I feel that the native UI of We...
Preface When developing WeChat applets, you often...
Sort Tool The Linux sort command is used to sort ...
Introduction: The disadvantages of storing all da...
Recently, when upgrading the Zabbix database from...