Spring Boot and Docker

I went through this Spring Framework page describing running a Spring Boot application in a Docker container.  Pretty cool.  I will investigate Spring Boot some more and also the Dockerfile used to create the image being used.  There are a couple of new items I’ve never seen, including “ENTRYPOINT” and “VOLUME”.

What I’d like to do is add a bit of database access to this skeletal project.  Maybe utilize the MySQL Docker image I downloaded a few days ago with this new Spring Boot image to make a CRUD-type application with the two images.

I got a Spring Data JPA project going and working against my Docker MySQL image.  One difficulty I ran into was the port on which MySQL is running.  I’m already running MySQL on this machine, so 3306 is in use.  And when I fire up the image, it’s just grabbing a random port which makes it difficult to configure the Spring app’s datasource.  Not sure how much I’ll work on that for now…

Leave a Reply