Skip to main content Link Search Menu Expand Document (external link)

2.1.1 Create Docker Container Image of your Application

This tutorial demostrates how to create a Docker Container Image of your Spring Boot Application.

Pre-Requisites

Installations

Note: Right Click Installtions links and Click Open In New Tab

Note: Be sure to add JAVA_HOME to System Environment Varibales. See Support: All Prerequisites, Installation Notes

Note: Run the following commands in Terminal/Command line to verify Installations

docker -v
java -version

Create Docker Image

  1. Open your IDE
  2. Open the folder container your Spring Boot Application
  3. Open the Terminal in your IDE
  4. Open Docker Desktop
  5. Run the following commands
    1. Create a new executeable file (.jar) of your app

      Mac Windows
      ./mvnw clean install mvnw.cmd clean install
    2. Build a Docker Image called ‘resume-image’ from your project

       docker build -t resume-image . 
      

      Note: You must include the . at the end

    3. See that your image was created

       docker image ls
      
  6. Keep track of your image name!