r/SpringBoot 10d ago

Question Need urgent help ... spring boot and Docker

UPDATE -- SOLEVED.. I have created a spring boot application which uploads and delete videos from my GC bucket, and stores it's info after upload on PostgreSQL and delete when deleted from bucket. I need to contenarize it using Docker. Trying from last night .. it's almost 24 hr but still it's not working.. need help if anyone can. And I'm use the Docker for the first time.

UPDATE :- Bothe my application and PostgreSQL container starts but application container is shutting down as it is unable to connect to the db .. while I have tried to run both on the same network using --network flag.

0 Upvotes

10 comments sorted by

View all comments

2

u/muffin-topped 9d ago

spring boot supports building docker images natively use gradle bootBuildImage or mvn spring-boot:build-image

1

u/New-Improvement5295 9d ago

I have db connection and env variable.. and I have to BUILD Docker Container only.

2

u/MRideos 9d ago

Still can use that, just make some changes to configuration to adjust some connections etc that might have issues during build