Spring Boot + Maven + Docker + Jumpserver
In this example:
Using Cloud Native Build to package Spring Boot + Maven project, build Docker image and publish to artifact repository
Configured settings.xml to use Tencent Cloud's Maven Mirror for acceleration
Use SSH Plugin and Jump server, deploy docker image in user intranet
Use Cloud Native Build (CNB) to build your project
Write a Dockerfile
Declarative build cache
Understand environment variables and their usage
Learn how to use Docker artifact repository
Configure .ide/Dockerfile for Cloud Native Development
Configure Tencent Cloud Maven Mirror and Private Repository
Please refer to: settings.xml and pom.xml in the repository, which contain corresponding comments
Build commands:
Build: mvn package -s ./settings.xml (actual command may vary)
Publish Maven package: mvn deploy -s ./settings.xml (actual command may vary)
If the configured Mirror doesn't take effect, try replacing -s with -gs, e.g. mvn package -gs ./settings.xml
REMOTE_HOST: xxx
REMOTE_USERNAME: xxx
REMOTE_PORT: xxx
REMOTE_KEY: |
-----BEGIN RSA PRIVATE KEY-----
xxxxxxxx
-----END RSA PRIVATE KEY-----
PROXY_HOST: xxx
PROXY_USERNAME: xxx
PROXY_PORT: xxx
PROXY_KEY: |
-----BEGIN RSA PRIVATE KEY-----
xxxxxxxx
-----END RSA PRIVATE KEY-----
Command line execution
$ mvn spring-boot:run
Debug Mode
Click the "Run and Debug" icon in the activity bar on the left side of VS Code, select "Launch file" from the run and debug drop-down list, and then click the green run button (or press F5 directly). View configuration