title: Unable to create custom image name in Spring Boot 2.5.5 with Docker
body: <p>I am developing small Spring Boot micro-service application. I am facing an issue when I am trying to create custom Spring image to deploy into Docker engine. To create new custom image I am using configuration element in Maven plugin section of my POM file.</p>
  <blockquote>
  <p>Error : Failed to execute goal
  org.springframework.boot:spring-boot-maven-plugin:2.5.5:build-image
  (default-cli) on project BankModule: Execution default-cli of goal
  org.springframework.boot:spring-boot-maven-plugin:2.5.5:build-image
  failed: Unable to parse image reference
  &quot;kolludocker/ms1-BankModule:0.0.1-SNAPSHOT&quot;. Image reference must be
  in the form '[domainHost:port/][path/]name[:tag][@digest]', with
  'path' and 'name' containing only [a-z0-9][.][_][-] -&gt; [Help 1]
  [ERROR]</p>
  </blockquote>
  <p>The <code>pom.xml</code> file :</p>
  <pre class="lang-xml prettyprint-override"><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
  &lt;project xmlns=&quot;http://maven.apache.org/POM/4.0.0&quot;
           xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
           xsi:schemaLocation=&quot;http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd&quot;&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
      &lt;parent&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-parent&lt;/artifactId&gt;
          &lt;version&gt;2.5.5&lt;/version&gt;
          &lt;relativePath/&gt; &lt;!-- lookup parent from repository --&gt;
      &lt;/parent&gt;
  
      &lt;groupId&gt;com.kollu.BankModule&lt;/groupId&gt;
      &lt;artifactId&gt;BankModule&lt;/artifactId&gt;
      &lt;version&gt;0.0.1-SNAPSHOT
      &lt;/version&gt;
      &lt;name&gt;BankModule&lt;/name&gt;
      &lt;description&gt;BankModule SpringBoot and MicroServices project
      &lt;/description&gt;
      &lt;properties&gt;
          &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
          &lt;project.reporting.outputEncoding&gt;UTF-8&lt;/project.reporting.outputEncoding&gt;
          &lt;java.version&gt;1.8&lt;/java.version&gt;
          &lt;spring-cloud.version&gt;2020.0.4&lt;/spring-cloud.version&gt; &lt;!-- Eureka server --&gt;
      &lt;/properties&gt;
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-actuator&lt;/artifactId&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-data-jpa&lt;/artifactId&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-web&lt;/artifactId&gt;
          &lt;/dependency&gt;
          &lt;!-- Eureka server --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.cloud&lt;/groupId&gt;
              &lt;artifactId&gt;spring-cloud-starter&lt;/artifactId&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.cloud&lt;/groupId&gt;
              &lt;artifactId&gt;spring-cloud-starter-config&lt;/artifactId&gt;
          &lt;/dependency&gt; &lt;!-- Inbuild LoadBalancer dependency--&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.cloud&lt;/groupId&gt;
              &lt;artifactId&gt;spring-cloud-starter-netflix-eureka-client&lt;/artifactId&gt;
          &lt;/dependency&gt;
          &lt;!-- Fault tolerance- Circuit Breakers with resilience4j --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-aop&lt;/artifactId&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;io.github.resilience4j&lt;/groupId&gt;
              &lt;artifactId&gt;resilience4j-spring-boot2&lt;/artifactId&gt;
          &lt;/dependency&gt;
          &lt;!-- Distributed Tracing(To generate unique id per each logger) - sleuth,RabbitMQ,ZipKin --&gt; &lt;!-- &lt;dependency&gt; &lt;groupId&gt;org.springframework.cloud&lt;/groupId&gt; &lt;artifactId&gt;spring-cloud-starter-sleuth&lt;/artifactId&gt; &lt;/dependency&gt; &lt;dependency&gt; &lt;groupId&gt;org.springframework.cloud&lt;/groupId&gt; &lt;artifactId&gt;spring-cloud-sleuth-zipkin&lt;/artifactId&gt; &lt;/dependency&gt; &lt;dependency&gt; &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt; &lt;artifactId&gt;spring-boot-starter-amqp&lt;/artifactId&gt; &lt;/dependency&gt; --&gt;
          &lt;!-- mvnrepository.com/artifact/org.springframework.boot/… --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-devtools&lt;/artifactId&gt;
              &lt;scope&gt;runtime&lt;/scope&gt;
              &lt;optional&gt;true&lt;/optional&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-test&lt;/artifactId&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;!-- Oracle --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.oracle.database.jdbc&lt;/groupId&gt;
              &lt;artifactId&gt;ojdbc8&lt;/artifactId&gt; &lt;!-- &lt;scope&gt;12.2.0.1&lt;/scope&gt; --&gt;
              &lt;version&gt;12.2.0.1&lt;/version&gt;&lt;!--$NO-MVN-MAN-VER$--&gt;
          &lt;/dependency&gt; &lt;!-- Swagger api --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;io.springfox&lt;/groupId&gt;
              &lt;artifactId&gt;springfox-swagger2&lt;/artifactId&gt;
              &lt;version&gt;2.7.0&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;io.springfox&lt;/groupId&gt;
              &lt;artifactId&gt;springfox-swagger-ui&lt;/artifactId&gt;
              &lt;version&gt;2.7.0&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;!-- Field/ Input values validation --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-validation&lt;/artifactId&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt; &lt;!-- Eureka server --&gt;
      &lt;dependencyManagement&gt;
          &lt;dependencies&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;org.springframework.cloud&lt;/groupId&gt;
                  &lt;artifactId&gt;spring-cloud-dependencies&lt;/artifactId&gt;
                  &lt;version&gt;${spring-cloud.version}&lt;/version&gt;
                  &lt;type&gt;pom&lt;/type&gt;
                  &lt;scope&gt;import&lt;/scope&gt;
              &lt;/dependency&gt;
          &lt;/dependencies&gt;
      &lt;/dependencyManagement&gt;
  
      &lt;build&gt;
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
                  &lt;artifactId&gt;spring-boot-maven-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.5.5&lt;/version&gt;&lt;!--$NO-MVN-MAN-VER$--&gt;
                  &lt;configuration&gt;
                      &lt;image&gt;
                          &lt;name&gt;kolludocker/ms1-${project.artifactId}:${project.version}&lt;/name&gt;
                      &lt;/image&gt;
                      &lt;pullPolicy&gt;IF_NOT_PRESENT&lt;/pullPolicy&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;
  &lt;/project&gt;
  </code></pre>