Menu

I really want to learn more about the Java framework Spring. The simplicity to build enterprise applications together with Spring’s momentum makes it really interesting. So I started with a simple tutorial and deployed that Spring application to Bluemix.

Spring provides a simple hello world Spring Boot with Docker tutorial with a Spring Boot application with one REST API. Maven and Gradle can be used, not only to build the Java application but also a Docker image which can be deployed to Bluemix.

The Spring tutorial states that you need 15 minutes for the tutorial. In my case that was true since I had the prerequisites JDK 1.8, Maven and Docker already installed. For the deployment of the application you don’t need more than 5 additional minutes.

I won’t repeat all the steps from the Spring tutorial here, but essentially this is what you need to do: – Clone a Github project. Use the ‘complete’ version of the application – Build the project via Maven or Gradle – Optional: Run the application locally: Run the built jar file which comes with Tomcat and your application – Build the Docker image via Maven or Gradle plugins

The tutorial describes how to push the image to Docker Hub (via “docker push springio/gs-spring-boot-docker”). To push the image to Bluemix follow the next steps instead.