Spring Boot API deployment using GitLab CI/CD and Docker
5 min readMay 15, 2023
In this story, we’ll explain step by step how to use GitLab CI/CD to build, test and deploy Spring boot API using Docker.
· Prerequisites
· Spring boot application setup
· GitLab Ci/CD
∘ Using Docker inside GitLab CI
∘ Run GitLab Runner in a container
∘ Run GitLab CI/CD pipeline
∘ View pipeline status and jobs
· Source code
· Conclusion
· Troubleshooting
· References
Prerequisites
This is the list of all the prerequisites for following this story:
- A Spring boot 3+ app with Java 17 and Maven 3.6.+
- A Gitlab account
- A virtual machine (VM) (with Centos7 as part of this story)
- Git
- Docker installed on the VM
- Docker compose installed
- Postman / insomnia or any other API testing tool (optional)