Spring Boot 3.0 API deployment using Jenkins pipeline and Docker

Eric Anicet
5 min readApr 4, 2023

In this story, we’ll explain step by step how to deploy a Spring boot application using Jenkins pipeline and Docker.

· Prerequisites
· Spring boot application setup
Project Structure
Containerize application
· Github
· Configure Jenkins
· Build Jenkins pipeline job
· Conclusion
· References

Prerequisites

This is the list of all the prerequisites for following this story:

  • Spring Boot 3
  • Maven 3.6.+
  • Java 17
  • A GitHub repository
  • Git
  • Jenkins instance installed
  • Docker installed
  • Docker compose installed
  • PostgreSQL
  • Postman / insomnia or any other API testing tool (optional)

Spring boot application setup

Suppose we already have a simple Spring Boot Rest API that exposes book endpoints. The application is connected to the PostgreSQL database.

--

--