logo
0
0
Login
Forkfromexamples/ecosystem/springboot-maven-docker-jumpserver, ahead:main1 commits, behind:main2 commits

Spring Boot + Maven + Docker + Jumpserver

badge badge badge

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

Prerequisites

  1. Use Cloud Native Build (CNB) to build your project
  2. Write a Dockerfile
  3. Declarative build cache
  4. Understand environment variables and their usage
  5. Learn how to use Docker artifact repository
  6. 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

Quick Start

Network Topology

Network Topology

configurate Secrets

# springboot-maven-docker-jumpserver-config.yml 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-----

Run Service

  1. Command line execution
# Run in terminal $ mvn spring-boot:run
  1. 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

About

No description, topics, or website provided.
860.00 KiB
0 forks0 stars3 branches0 TagREADMEOther license
Language
Java55.2%
Dockerfile38.1%
HTML6.7%