当前位置:

首页 > 编程开发 > springboot怎么整合docker构建Docker镜像

springboot怎么整合docker构建Docker镜像

docker是一个开源的引擎,可以轻松的为任何应用创建一个轻量级的、可移植的、自给自足的容器。开发者在笔记本上编译测试通过的容器可以批量地在生产环境中部署,包括vms(虚拟机)、baremetal、openstack集群和其他的基础应用平台。docker的应用场景web应用的自动化打包和发布;自动化测试和持续集成、发布;在服务型环境中部署和调整数据库或其他的后台应用;从头编译或者扩展现有的openshift或cloudfoundry平台来搭建自己的paas环境。项目结构packagehello;impor

docker是一个开源的引擎,可以轻松的为任何应用创建一个轻量级的、可移植的、自给自足的容器。开发者在笔记本上编译测试通过的容器可以批量地在生产环境中部署,包括vms(虚拟机)、bare metal、openstack 集群和其他的基础应用平台。

docker的应用场景

web应用的自动化打包和发布;
自动化测试和持续集成、发布;
在服务型环境中部署和调整数据库或其他的后台应用;
从头编译或者扩展现有的openshift或cloud foundry平台来搭建自己的paas环境。

项目结构

springboot怎么整合docker构建Docker镜像

package hello;

import org.springframework.boot.springapplication;
import org.springframework.boot.autoconfigure.springbootapplication;
import org.springframework.web.bind.annotation.requestmapping;
import org.springframework.web.bind.annotation.restcontroller;

@springbootapplication
@restcontroller
public class application {

 @requestmapping("/")
 public string home() {
  return "hello docker world";
 }

 public static void main(string[] args) {
  springapplication.run(application.class, args);
 }

}
server:
 port: 8010

#todo: figure out why i need this here and in bootstrap.yml
spring:
 application:
 name: testlatticeapp

ribbon:
 serverlistrefreshinterval: 1000

endpoints:
 health:
 sensitive: false
 restart:
 enabled: true
 shutdown:
 enabled: true

dockfile

from frolvlad/alpine-oraclejdk8:slim
volume /tmp
add gs-spring-boot-docker-master-0.0.1-snapshot.jar app.jar
run sh -c 'touch /app.jar'
env java_opts=""
entrypoint [ "sh", "-c", "java $java_opts -djava.security.egd=file:/dev/./urandom -jar /app.jar" ]

解释下这个配置文件:

volume 指定了临时文件目录为/tmp。其效果是在主机 /var/lib/docker 目录下创建了一个临时文件,并链接到容器的/tmp。改步骤是可选的,如果涉及到文件系统的应用就很有必要了。/tmp目录用来持久化到 docker 数据文件夹,因为 spring boot 使用的内嵌 tomcat 容器默认使用/tmp作为工作目录项目的 jar 文件作为 “app.jar” 添加到容器的entrypoint 执行项目 app.jar。为了缩短 tomcat 启动时间,添加一个系统属性指向 “/dev/urandom” 作为 entropy source

pom.xml


 4.0.0
 gs-spring-boot-docker-master
 gs-spring-boot-docker-master
 0.0.1-snapshot
 jar 
 
 
  org.springframework.boot
  spring-boot-starter-parent
  2.0.2.release
  
 

 
  utf-8 
  utf-8
   
  springio
  1.8
 

 
  
   
    org.springframework.boot
    spring-boot-maven-plugin
   
    
    
    com.spotify 
    docker-maven-plugin 
    0.4.13 
     
     ${docker.image.prefix}/${project.artifactid} 
     src/main/docker 
      
       
       / 
       ${project.build.directory} 
       ${project.build.finalname}.jar 
       
      
     
    
    

  
  
  
 

 
  
   org.springframework.boot
   spring-boot-starter-web
  
  
   org.springframework.boot
   spring-boot-starter-test
   test
  
 
 

dockfile配置文件详解

  • volume指定了临时文件目录为/tmp。其效果是在主机/var/lib/docker目录下创建了一个临时文件,并链接到容器的/tmp。改步骤是可选的,如果涉及到文件系统的应用就很有必要了。/tmp目录用来持久化到 docker 数据文件夹,因为 spring boot 使用的内嵌 tomcat 容器默认使用/tmp作为工作目录

  • 项目的 jar 文件作为 “app.jar” 添加到容器的

  • entrypoint执行项目 app.jar。为了缩短tomcat 启动时间,添加一个系统属性指向 “/dev/urandom” 作为 entropy source

非docker方式运行程序

使用maven命令

mvn package

运行:java -jar target/lidong-spring-boot-demo-1.0-snapshot.jar

访问项目

如果程序正确运行,浏览器访问http://localhost:8081/,可以看到页面 “hello docker world.” 字样。

在docker开始部署springboot项目(方法一)

1.在centos7 ~ 创建一个文件夹docker 里面放置 上面的dockerfile 和 springboot 打包的项目docker_spring_boot.jar

2.

springboot怎么整合docker构建Docker镜像

在该docker文件下 指令:docker build -t docker .

执行docker build命令,docker就会根据dockerfile里你定义好的命令进行构建新的镜像。

-t代表要构建的镜像的tag,.代表当前目录,也就是dockerfile所在的目录。然后就可以看到在下载各种依赖的maven、各种jar,构建完毕后,启动项目。

springboot怎么整合docker构建Docker镜像

在该docker文件下使用 指令:docker run -d -p 8080:8080 docker运行该springboot项目,可以看到构建完毕的景象docker了访问ip地址:通过ifconfig查到

springboot怎么整合docker构建Docker镜像

最后,访问本地浏览器:

springboot怎么整合docker构建Docker镜像

在docker开始部署springboot项目(方法二)

把整个工程代码拷到centos服务器

[root@iz2zeh5mjwg5u2vl2fawchz ~]# ls /usr/local/gs-spring-boot-docker-master
pom.xml src target

在/usr/local/gs-spring-boot-docker-master目录下运行命令:mvn package docker:build

[root@iz2zeh5mjwg5u2vl2fawchz gs-spring-boot-docker-master]# mvn package docker:build
[info] scanning for projects...
[info]
[info] ------------------------------------------------------------------------
[info] building gs-spring-boot-docker-master 0.0.1-snapshot
[info] ------------------------------------------------------------------------
[info]
[info] --- maven-resources-plugin:3.0.1:resources (default-resources) @ gs-spring-boot-docker-master ---
[info] using 'utf-8' encoding to copy filtered resources.
[info] copying 1 resource
[info] copying 0 resource
[info]
[info] --- maven-compiler-plugin:3.7.0:compile (default-compile) @ gs-spring-boot-docker-master ---
[info] changes detected - recompiling the module!
[info] compiling 1 source file to /usr/local/gs-spring-boot-docker-master/target/classes
[info]
[info] --- maven-resources-plugin:3.0.1:testresources (default-testresources) @ gs-spring-boot-docker-master ---
[info] using 'utf-8' encoding to copy filtered resources.
[info] copying 0 resource
[info]
[info] --- maven-compiler-plugin:3.7.0:testcompile (default-testcompile) @ gs-spring-boot-docker-master ---
[info] changes detected - recompiling the module!
[info] compiling 1 source file to /usr/local/gs-spring-boot-docker-master/target/test-classes
[info]
[info] --- maven-surefire-plugin:2.21.0:test (default-test) @ gs-spring-boot-docker-master ---
[info]
[info] -------------------------------------------------------
[info] t e s t s
[info] -------------------------------------------------------
[info] running hello.helloworldconfigurationtests
10:29:05.887 [main] debug org.springframework.test.context.junit4.springjunit4classrunner - springjunit4classrunner constructor called with [class hello.helloworldconfigurationtests]
10:29:05.905 [main] debug org.springframework.test.context.bootstraputils - instantiating cacheawarecontextloaderdelegate from class [org.springframework.test.context.cache.defaultcacheawarecontextloaderdelegate]
10:29:05.912 [main] debug org.springframework.test.context.bootstraputils - instantiating bootstrapcontext using constructor [public org.springframework.test.context.support.defaultbootstrapcontext(java.lang.class,org.springframework.test.context.cacheawarecontextloaderdelegate)]
10:29:05.940 [main] debug org.springframework.test.context.bootstraputils - instantiating testcontextbootstrapper for test class [hello.helloworldconfigurationtests] from class [org.springframework.boot.test.context.springboottestcontextbootstrapper]
10:29:05.960 [main] info org.springframework.boot.test.context.springboottestcontextbootstrapper - neither @contextconfiguration nor @contexthierarchy found for test class [hello.helloworldconfigurationtests], using springbootcontextloader
10:29:05.963 [main] debug org.springframework.test.context.support.abstractcontextloader - did not detect default resource location for test class [hello.helloworldconfigurationtests]: class path resource [hello/helloworldconfigurationtests-context.xml] does not exist
10:29:05.963 [main] debug org.springframework.test.context.support.abstractcontextloader - did not detect default resource location for test class [hello.helloworldconfigurationtests]: class path resource [hello/helloworldconfigurationtestscontext.groovy] does not exist
10:29:05.963 [main] info org.springframework.test.context.support.abstractcontextloader - could not detect default resource locations for test class [hello.helloworldconfigurationtests]: no resource found for suffixes {-context.xml, context.groovy}.
10:29:05.964 [main] info org.springframework.test.context.support.annotationconfigcontextloaderutils - could not detect default configuration classes for test class [hello.helloworldconfigurationtests]: helloworldconfigurationtests does not declare any static, non-private, non-final, nested classes annotated with @configuration.
10:29:06.047 [main] debug org.springframework.test.context.support.activeprofilesutils - could not find an 'annotation declaring class' for annotation type [org.springframework.test.context.activeprofiles] and class [hello.helloworldconfigurationtests]
10:29:06.057 [main] debug org.springframework.core.env.standardenvironment - adding propertysource 'systemproperties' with lowest search precedence
10:29:06.057 [main] debug org.springframework.core.env.standardenvironment - adding propertysource 'systemenvironment' with lowest search precedence
10:29:06.057 [main] debug org.springframework.core.env.standardenvironment - initialized standardenvironment with propertysources [mappropertysource@1270144618 {name='systemproperties', properties={java.runtime.name=openjdk runtime environment, sun.boot.library.path=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.171-8.b10.el7_5.x86_64/jre/lib/amd64, java.vm.version=25.171-b10, java.vm.vendor=oracle corporation, java.vendor.url=http://java.oracle.com/, path.separator=:, java.vm.name=openjdk 64-bit server vm, file.encoding.pkg=sun.io, user.country=us, sun.java.launcher=sun_standard, sun.os.patch.level=unknown, java.vm.specification.name=java virtual machine specification, user.dir=/usr/local/gs-spring-boot-docker-master, java.runtime.version=1.8.0_171-b10, basedir=/usr/local/gs-spring-boot-docker-master, java.awt.graphicsenv=sun.awt.x11graphicsenvironment, java.endorsed.dirs=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.171-8.b10.el7_5.x86_64/jre/lib/endorsed, os.arch=amd64, surefire.real.class.path=/usr/local/gs-spring-boot-docker-master/target/surefire/surefirebooter4703757062554335800.jar, java.io.tmpdir=/tmp, line.separator=
, java.vm.specification.vendor=oracle corporation, os.name=linux, sun.jnu.encoding=utf-8, java.library.path=/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib, surefire.test.class.path=/usr/local/gs-spring-boot-docker-master/target/test-classes:/usr/local/gs-spring-boot-docker-master/target/classes:/root/.m2/repository/org/springframework/boot/spring-boot-starter-web/2.0.2.release/spring-boot-starter-web-2.0.2.release.jar:/root/.m2/repository/org/springframework/boot/spring-boot-starter/2.0.2.release/spring-boot-starter-2.0.2.release.jar:/root/.m2/repository/org/springframework/boot/spring-boot/2.0.2.release/spring-boot-2.0.2.release.jar:/root/.m2/repository/org/springframework/boot/spring-boot-autoconfigure/2.0.2.release/spring-boot-autoconfigure-2.0.2.release.jar:/root/.m2/repository/org/springframework/boot/spring-boot-starter-logging/2.0.2.release/spring-boot-starter-logging-2.0.2.release.jar:/root/.m2/repository/ch/qos/logback/logback-classic/1.2.3/logback-classic-1.2.3.jar:/root/.m2/repository/ch/qos/logback/logback-core/1.2.3/logback-core-1.2.3.jar:/root/.m2/repository/org/apache/logging/log4j/log4j-to-slf4j/2.10.0/log4j-to-slf4j-2.10.0.jar:/root/.m2/repository/org/apache/logging/log4j/log4j-api/2.10.0/log4j-api-2.10.0.jar:/root/.m2/repository/org/slf4j/jul-to-slf4j/1.7.25/jul-to-slf4j-1.7.25.jar:/root/.m2/repository/javax/annotation/javax.annotation-api/1.3.2/javax.annotation-api-1.3.2.jar:/root/.m2/repository/org/yaml/snakeyaml/1.19/snakeyaml-1.19.jar:/root/.m2/repository/org/springframework/boot/spring-boot-starter-json/2.0.2.release/spring-boot-starter-json-2.0.2.release.jar:/root/.m2/repository/com/fasterxml/jackson/core/jackson-databind/2.9.5/jackson-databind-2.9.5.jar:/root/.m2/repository/com/fasterxml/jackson/core/jackson-annotations/2.9.0/jackson-annotations-2.9.0.jar:/root/.m2/repository/com/fasterxml/jackson/core/jackson-core/2.9.5/jackson-core-2.9.5.jar:/root/.m2/repository/com/fasterxml/jackson/datatype/jackson-datatype-jdk8/2.9.5/jackson-datatype-jdk8-2.9.5.jar:/root/.m2/repository/com/fasterxml/jackson/datatype/jackson-datatype-jsr310/2.9.5/jackson-datatype-jsr310-2.9.5.jar:/root/.m2/repository/com/fasterxml/jackson/module/jackson-module-parameter-names/2.9.5/jackson-module-parameter-names-2.9.5.jar:/root/.m2/repository/org/springframework/boot/spring-boot-starter-tomcat/2.0.2.release/spring-boot-starter-tomcat-2.0.2.release.jar:/root/.m2/repository/org/apache/tomcat/embed/tomcat-embed-core/8.5.31/tomcat-embed-core-8.5.31.jar:/root/.m2/repository/org/apache/tomcat/embed/tomcat-embed-el/8.5.31/tomcat-embed-el-8.5.31.jar:/root/.m2/repository/org/apache/tomcat/embed/tomcat-embed-websocket/8.5.31/tomcat-embed-websocket-8.5.31.jar:/root/.m2/repository/org/hibernate/validator/hibernate-validator/6.0.9.final/hibernate-validator-6.0.9.final.jar:/root/.m2/repository/javax/validation/validation-api/2.0.1.final/validation-api-2.0.1.final.jar:/root/.m2/repository/org/jboss/logging/jboss-logging/3.3.2.final/jboss-logging-3.3.2.final.jar:/root/.m2/repository/com/fasterxml/classmate/1.3.4/classmate-1.3.4.jar:/root/.m2/repository/org/springframework/spring-web/5.0.6.release/spring-web-5.0.6.release.jar:/root/.m2/repository/org/springframework/spring-beans/5.0.6.release/spring-beans-5.0.6.release.jar:/root/.m2/repository/org/springframework/spring-webmvc/5.0.6.release/spring-webmvc-5.0.6.release.jar:/root/.m2/repository/org/springframework/spring-aop/5.0.6.release/spring-aop-5.0.6.release.jar:/root/.m2/repository/org/springframework/spring-context/5.0.6.release/spring-context-5.0.6.release.jar:/root/.m2/repository/org/springframework/spring-expression/5.0.6.release/spring-expression-5.0.6.release.jar:/root/.m2/repository/org/springframework/boot/spring-boot-starter-test/2.0.2.release/spring-boot-starter-test-2.0.2.release.jar:/root/.m2/repository/org/springframework/boot/spring-boot-test/2.0.2.release/spring-boot-test-2.0.2.release.jar:/root/.m2/repository/org/springframework/boot/spring-boot-test-autoconfigure/2.0.2.release/spring-boot-test-autoconfigure-2.0.2.release.jar:/root/.m2/repository/com/jayway/jsonpath/json-path/2.4.0/json-path-2.4.0.jar:/root/.m2/repository/net/minidev/json-smart/2.3/json-smart-2.3.jar:/root/.m2/repository/net/minidev/accessors-smart/1.2/accessors-smart-1.2.jar:/root/.m2/repository/org/ow2/asm/asm/5.0.4/asm-5.0.4.jar:/root/.m2/repository/org/slf4j/slf4j-api/1.7.25/slf4j-api-1.7.25.jar:/root/.m2/repository/junit/junit/4.12/junit-4.12.jar:/root/.m2/repository/org/assertj/assertj-core/3.9.1/assertj-core-3.9.1.jar:/root/.m2/repository/org/mockito/mockito-core/2.15.0/mockito-core-2.15.0.jar:/root/.m2/repository/net/bytebuddy/byte-buddy/1.7.11/byte-buddy-1.7.11.jar:/root/.m2/repository/net/bytebuddy/byte-buddy-agent/1.7.11/byte-buddy-agent-1.7.11.jar:/root/.m2/repository/org/objenesis/objenesis/2.6/objenesis-2.6.jar:/root/.m2/repository/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar:/root/.m2/repository/org/hamcrest/hamcrest-library/1.3/hamcrest-library-1.3.jar:/root/.m2/repository/org/skyscreamer/jsonassert/1.5.0/jsonassert-1.5.0.jar:/root/.m2/repository/com/vaadin/external/google/android-json/0.0.20131108.vaadin1/android-json-0.0.20131108.vaadin1.jar:/root/.m2/repository/org/springframework/spring-core/5.0.6.release/spring-core-5.0.6.release.jar:/root/.m2/repository/org/springframework/spring-jcl/5.0.6.release/spring-jcl-5.0.6.release.jar:/root/.m2/repository/org/springframework/spring-test/5.0.6.release/spring-test-5.0.6.release.jar:/root/.m2/repository/org/xmlunit/xmlunit-core/2.5.1/xmlunit-core-2.5.1.jar:, java.specification.name=java platform api specification, java.class.version=52.0, sun.management.compiler=hotspot 64-bit tiered compilers, os.version=3.10.0-693.2.2.el7.x86_64, user.home=/root, user.timezone=asia/shanghai, java.awt.printerjob=sun.print.psprinterjob, file.encoding=utf-8, java.specification.version=1.8, java.class.path=/usr/local/gs-spring-boot-docker-master/target/test-classes:/usr/local/gs-spring-boot-docker-master/target/classes:/root/.m2/repository/org/springframework/boot/spring-boot-starter-web/2.0.2.release/spring-boot-starter-web-2.0.2.release.jar:/root/.m2/repository/org/springframework/boot/spring-boot-starter/2.0.2.release/spring-boot-starter-2.0.2.release.jar:/root/.m2/repository/org/springframework/boot/spring-boot/2.0.2.release/spring-boot-2.0.2.release.jar:/root/.m2/repository/org/springframework/boot/spring-boot-autoconfigure/2.0.2.release/spring-boot-autoconfigure-2.0.2.release.jar:/root/.m2/repository/org/springframework/boot/spring-boot-starter-logging/2.0.2.release/spring-boot-starter-logging-2.0.2.release.jar:/root/.m2/repository/ch/qos/logback/logback-classic/1.2.3/logback-classic-1.2.3.jar:/root/.m2/repository/ch/qos/logback/logback-core/1.2.3/logback-core-1.2.3.jar:/root/.m2/repository/org/apache/logging/log4j/log4j-to-slf4j/2.10.0/log4j-to-slf4j-2.10.0.jar:/root/.m2/repository/org/apache/logging/log4j/log4j-api/2.10.0/log4j-api-2.10.0.jar:/root/.m2/repository/org/slf4j/jul-to-slf4j/1.7.25/jul-to-slf4j-1.7.25.jar:/root/.m2/repository/javax/annotation/javax.annotation-api/1.3.2/javax.annotation-api-1.3.2.jar:/root/.m2/repository/org/yaml/snakeyaml/1.19/snakeyaml-1.19.jar:/root/.m2/repository/org/springframework/boot/spring-boot-starter-json/2.0.2.release/spring-boot-starter-json-2.0.2.release.jar:/root/.m2/repository/com/fasterxml/jackson/core/jackson-databind/2.9.5/jackson-databind-2.9.5.jar:/root/.m2/repository/com/fasterxml/jackson/core/jackson-annotations/2.9.0/jackson-annotations-2.9.0.jar:/root/.m2/repository/com/fasterxml/jackson/core/jackson-core/2.9.5/jackson-core-2.9.5.jar:/root/.m2/repository/com/fasterxml/jackson/datatype/jackson-datatype-jdk8/2.9.5/jackson-datatype-jdk8-2.9.5.jar:/root/.m2/repository/com/fasterxml/jackson/datatype/jackson-datatype-jsr310/2.9.5/jackson-datatype-jsr310-2.9.5.jar:/root/.m2/repository/com/fasterxml/jackson/module/jackson-module-parameter-names/2.9.5/jackson-module-parameter-names-2.9.5.jar:/root/.m2/repository/org/springframework/boot/spring-boot-starter-tomcat/2.0.2.release/spring-boot-starter-tomcat-2.0.2.release.jar:/root/.m2/repository/org/apache/tomcat/embed/tomcat-embed-core/8.5.31/tomcat-embed-core-8.5.31.jar:/root/.m2/repository/org/apache/tomcat/embed/tomcat-embed-el/8.5.31/tomcat-embed-el-8.5.31.jar:/root/.m2/repository/org/apache/tomcat/embed/tomcat-embed-websocket/8.5.31/tomcat-embed-websocket-8.5.31.jar:/root/.m2/repository/org/hibernate/validator/hibernate-validator/6.0.9.final/hibernate-validator-6.0.9.final.jar:/root/.m2/repository/javax/validation/validation-api/2.0.1.final/validation-api-2.0.1.final.jar:/root/.m2/repository/org/jboss/logging/jboss-logging/3.3.2.final/jboss-logging-3.3.2.final.jar:/root/.m2/repository/com/fasterxml/classmate/1.3.4/classmate-1.3.4.jar:/root/.m2/repository/org/springframework/spring-web/5.0.6.release/spring-web-5.0.6.release.jar:/root/.m2/repository/org/springframework/spring-beans/5.0.6.release/spring-beans-5.0.6.release.jar:/root/.m2/repository/org/springframework/spring-webmvc/5.0.6.release/spring-webmvc-5.0.6.release.jar:/root/.m2/repository/org/springframework/spring-aop/5.0.6.release/spring-aop-5.0.6.release.jar:/root/.m2/repository/org/springframework/spring-context/5.0.6.release/spring-context-5.0.6.release.jar:/root/.m2/repository/org/springframework/spring-expression/5.0.6.release/spring-expression-5.0.6.release.jar:/root/.m2/repository/org/springframework/boot/spring-boot-starter-test/2.0.2.release/spring-boot-starter-test-2.0.2.release.jar:/root/.m2/repository/org/springframework/boot/spring-boot-test/2.0.2.release/spring-boot-test-2.0.2.release.jar:/root/.m2/repository/org/springframework/boot/spring-boot-test-autoconfigure/2.0.2.release/spring-boot-test-autoconfigure-2.0.2.release.jar:/root/.m2/repository/com/jayway/jsonpath/json-path/2.4.0/json-path-2.4.0.jar:/root/.m2/repository/net/minidev/json-smart/2.3/json-smart-2.3.jar:/root/.m2/repository/net/minidev/accessors-smart/1.2/accessors-smart-1.2.jar:/root/.m2/repository/org/ow2/asm/asm/5.0.4/asm-5.0.4.jar:/root/.m2/repository/org/slf4j/slf4j-api/1.7.25/slf4j-api-1.7.25.jar:/root/.m2/repository/junit/junit/4.12/junit-4.12.jar:/root/.m2/repository/org/assertj/assertj-core/3.9.1/assertj-core-3.9.1.jar:/root/.m2/repository/org/mockito/mockito-core/2.15.0/mockito-core-2.15.0.jar:/root/.m2/repository/net/bytebuddy/byte-buddy/1.7.11/byte-buddy-1.7.11.jar:/root/.m2/repository/net/bytebuddy/byte-buddy-agent/1.7.11/byte-buddy-agent-1.7.11.jar:/root/.m2/repository/org/objenesis/objenesis/2.6/objenesis-2.6.jar:/root/.m2/repository/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar:/root/.m2/repository/org/hamcrest/hamcrest-library/1.3/hamcrest-library-1.3.jar:/root/.m2/repository/org/skyscreamer/jsonassert/1.5.0/jsonassert-1.5.0.jar:/root/.m2/repository/com/vaadin/external/google/android-json/0.0.20131108.vaadin1/android-json-0.0.20131108.vaadin1.jar:/root/.m2/repository/org/springframework/spring-core/5.0.6.release/spring-core-5.0.6.release.jar:/root/.m2/repository/org/springframework/spring-jcl/5.0.6.release/spring-jcl-5.0.6.release.jar:/root/.m2/repository/org/springframework/spring-test/5.0.6.release/spring-test-5.0.6.release.jar:/root/.m2/repository/org/xmlunit/xmlunit-core/2.5.1/xmlunit-core-2.5.1.jar:, user.name=root, java.vm.specification.version=1.8, sun.java.command=/usr/local/gs-spring-boot-docker-master/target/surefire/surefirebooter4703757062554335800.jar /usr/local/gs-spring-boot-docker-master/target/surefire 2018-06-21t10-29-04_776-jvmrun1 surefire2306677988440424207tmp surefire_06445366462775442424tmp, java.home=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.171-8.b10.el7_5.x86_64/jre, sun.arch.data.model=64, user.language=en, java.specification.vendor=oracle corporation, awt.toolkit=sun.awt.x11.xtoolkit, java.vm.info=mixed mode, java.version=1.8.0_171, java.ext.dirs=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.171-8.b10.el7_5.x86_64/jre/lib/ext:/usr/java/packages/lib/ext, sun.boot.class.path=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.171-8.b10.el7_5.x86_64/jre/lib/resources.jar:/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.171-8.b10.el7_5.x86_64/jre/lib/rt.jar:/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.171-8.b10.el7_5.x86_64/jre/lib/sunrsasign.jar:/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.171-8.b10.el7_5.x86_64/jre/lib/jsse.jar:/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.171-8.b10.el7_5.x86_64/jre/lib/jce.jar:/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.171-8.b10.el7_5.x86_64/jre/lib/charsets.jar:/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.171-8.b10.el7_5.x86_64/jre/lib/jfr.jar:/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.171-8.b10.el7_5.x86_64/jre/classes, java.vendor=oracle corporation, localrepository=/root/.m2/repository, file.separator=/, java.vendor.url.bug=http://bugreport.sun.com/bugreport/, sun.io.unicode.encoding=unicodelittle, sun.cpu.endian=little, sun.cpu.isalist=}}, systemenvironmentpropertysource@2074185499 {name='systemenvironment', properties={path=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin, histcontrol=ignoredups, lessopen=||/usr/bin/lesspipe.sh %s, shell=/bin/bash, histsize=1000, java_home=/usr/lib/jvm/java, ssh_tty=/dev/pts/0, ssh_client=49.66.150.128 7775 22, oldpwd=/usr/local/gs-spring-boot-docker-master, term=xterm, user=root,.utf-8, xdg_session_id=1180, ssh_connection=49.66.150.128 7775 172.17.69.217 22, mail=/var/spool/mail/root, hostname=iz2zeh5mjwg5u2vl2fawchz, m2_home=/usr/share/maven, logname=root, xdg_runtime_dir=/run/user/0, pwd=/usr/local/gs-spring-boot-docker-master, ls_colors=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=01;05;37;41:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=01;36:*.au=01;36:*.flac=01;36:*.mid=01;36:*.midi=01;36:*.mka=01;36:*.mp3=01;36:*.mpc=01;36:*.ogg=01;36:*.ra=01;36:*.wav=01;36:*.axa=01;36:*.oga=01;36:*.spx=01;36:*.xspf=01;36:, home=/root, shlvl=3, _=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.171-8.b10.el7_5.x86_64/jre/bin/java}}]
10:29:06.069 [main] debug org.springframework.core.io.support.pathmatchingresourcepatternresolver - resolved classpath location [hello/] to resources [url [file:/usr/local/gs-spring-boot-docker-master/target/test-classes/hello/], url [file:/usr/local/gs-spring-boot-docker-master/target/classes/hello/]]
10:29:06.069 [main] debug org.springframework.core.io.support.pathmatchingresourcepatternresolver - looking for matching resources in directory tree [/usr/local/gs-spring-boot-docker-master/target/test-classes/hello]
10:29:06.069 [main] debug org.springframework.core.io.support.pathmatchingresourcepatternresolver - searching directory [/usr/local/gs-spring-boot-docker-master/target/test-classes/hello] for files matching pattern [/usr/local/gs-spring-boot-docker-master/target/test-classes/hello/*.class]
10:29:06.081 [main] debug org.springframework.core.io.support.pathmatchingresourcepatternresolver - looking for matching resources in directory tree [/usr/local/gs-spring-boot-docker-master/target/classes/hello]
10:29:06.081 [main] debug org.springframework.core.io.support.pathmatchingresourcepatternresolver - searching directory [/usr/local/gs-spring-boot-docker-master/target/classes/hello] for files matching pattern [/usr/local/gs-spring-boot-docker-master/target/classes/hello/*.class]
10:29:06.081 [main] debug org.springframework.core.io.support.pathmatchingresourcepatternresolver - resolved location pattern [classpath*:hello/*.class] to resources [file [/usr/local/gs-spring-boot-docker-master/target/test-classes/hello/helloworldconfigurationtests.class], file [/usr/local/gs-spring-boot-docker-master/target/classes/hello/application.class]]
10:29:06.197 [main] debug org.springframework.context.annotation.classpathscanningcandidatecomponentprovider - identified candidate component class: file [/usr/local/gs-spring-boot-docker-master/target/classes/hello/application.class]
10:29:06.198 [main] info org.springframework.boot.test.context.springboottestcontextbootstrapper - found @springbootconfiguration hello.application for test class hello.helloworldconfigurationtests
10:29:06.397 [main] debug org.springframework.boot.test.context.springboottestcontextbootstrapper - @testexecutionlisteners is not present for class [hello.helloworldconfigurationtests]: using defaults.
10:29:06.398 [main] info org.springframework.boot.test.context.springboottestcontextbootstrapper - loaded default testexecutionlistener class names from location [meta-inf/spring.factories]: [org.springframework.boot.test.mock.mockito.mockitotestexecutionlistener, org.springframework.boot.test.mock.mockito.resetmockstestexecutionlistener, org.springframework.boot.test.autoconfigure.restdocs.restdocstestexecutionlistener, org.springframework.boot.test.autoconfigure.web.client.mockrestserviceserverresettestexecutionlistener, org.springframework.boot.test.autoconfigure.web.servlet.mockmvcprintonlyonfailuretestexecutionlistener, org.springframework.boot.test.autoconfigure.web.servlet.webdrivertestexecutionlistener, org.springframework.test.context.web.servlettestexecutionlistener, org.springframework.test.context.support.dirtiescontextbeforemodestestexecutionlistener, org.springframework.test.context.support.dependencyinjectiontestexecutionlistener, org.springframework.test.context.support.dirtiescontexttestexecutionlistener, org.springframework.test.context.transaction.transactionaltestexecutionlistener, org.springframework.test.context.jdbc.sqlscriptstestexecutionlistener]
10:29:06.414 [main] debug org.springframework.boot.test.context.springboottestcontextbootstrapper - skipping candidate testexecutionlistener [org.springframework.test.context.transaction.transactionaltestexecutionlistener] due to a missing dependency. specify custom listener classes or make the default listener classes and their required dependencies available. offending class: [org/springframework/transaction/transactiondefinition]
10:29:06.414 [main] debug org.springframework.boot.test.context.springboottestcontextbootstrapper - skipping candidate testexecutionlistener [org.springframework.test.context.jdbc.sqlscriptstestexecutionlistener] due to a missing dependency. specify custom listener classes or make the default listener classes and their required dependencies available. offending class: [org/springframework/transaction/interceptor/transactionattribute]
10:29:06.414 [main] info org.springframework.boot.test.context.springboottestcontextbootstrapper - using testexecutionlisteners: [org.springframework.test.context.web.servlettestexecutionlistener@443118b0, org.springframework.test.context.support.dirtiescontextbeforemodestestexecutionlistener@765d7657, org.springframework.boot.test.mock.mockito.mockitotestexecutionlistener@74235045, org.springframework.boot.test.autoconfigure.springbootdependencyinjectiontestexecutionlistener@618b19ad, org.springframework.test.context.support.dirtiescontexttestexecutionlistener@2d3379b4, org.springframework.boot.test.mock.mockito.resetmockstestexecutionlistener@30c15d8b, org.springframework.boot.test.autoconfigure.restdocs.restdocstestexecutionlistener@5e0e82ae, org.springframework.boot.test.autoconfigure.web.client.mockrestserviceserverresettestexecutionlistener@6771beb3, org.springframework.boot.test.autoconfigure.web.servlet.mockmvcprintonlyonfailuretestexecutionlistener@51399530, org.springframework.boot.test.autoconfigure.web.servlet.webdrivertestexecutionlistener@6b2ea799]
10:29:06.415 [main] debug org.springframework.test.annotation.profilevalueutils - retrieved @profilevaluesourceconfiguration [null] for test class [hello.helloworldconfigurationtests]
10:29:06.416 [main] debug org.springframework.test.annotation.profilevalueutils - retrieved profilevaluesource type [class org.springframework.test.annotation.systemprofilevaluesource] for class [hello.helloworldconfigurationtests]
10:29:06.417 [main] debug org.springframework.test.annotation.profilevalueutils - retrieved @profilevaluesourceconfiguration [null] for test class [hello.helloworldconfigurationtests]
10:29:06.417 [main] debug org.springframework.test.annotation.profilevalueutils - retrieved profilevaluesource type [class org.springframework.test.annotation.systemprofilevaluesource] for class [hello.helloworldconfigurationtests]
10:29:06.417 [main] debug org.springframework.test.annotation.profilevalueutils - retrieved @profilevaluesourceconfiguration [null] for test class [hello.helloworldconfigurationtests]
10:29:06.417 [main] debug org.springframework.test.annotation.profilevalueutils - retrieved profilevaluesource type [class org.springframework.test.annotation.systemprofilevaluesource] for class [hello.helloworldconfigurationtests]
10:29:06.420 [main] debug org.springframework.test.context.support.abstractdirtiescontexttestexecutionlistener - before test class: context [defaulttestcontext@6a6cb05c testclass = helloworldconfigurationtests, testinstance = [null], testmethod = [null], testexception = [null], mergedcontextconfiguration = [webmergedcontextconfiguration@40a4337a testclass = helloworldconfigurationtests, locations = '{}', classes = '{class hello.application}', contextinitializerclasses = '[]', activeprofiles = '{}', propertysourcelocations = '{}', propertysourceproperties = '{org.springframework.boot.test.context.springboottestcontextbootstrapper=true, server.port=0}', contextcustomizers = set[org.springframework.boot.test.context.filter.excludefiltercontextcustomizer@6950e31, org.springframework.boot.test.json.duplicatejsonobjectcontextcustomizerfactory$duplicatejsonobjectcontextcustomizer@52f759d7, org.springframework.boot.test.mock.mockito.mockitocontextcustomizer@0, org.springframework.boot.test.web.client.testresttemplatecontextcustomizer@396e2f39, org.springframework.boot.test.autoconfigure.properties.propertymappingcontextcustomizer@0, org.springframework.boot.test.autoconfigure.web.servlet.webdrivercontextcustomizerfactory$customizer@67b467e9], resourcebasepath = 'src/main/webapp', contextloader = 'org.springframework.boot.test.context.springbootcontextloader', parent = [null]], attributes = map['org.springframework.test.context.web.servlettestexecutionlistener.activatelistener' -> false]], class annotated with @dirtiescontext [true] with mode [after_class].
10:29:06.420 [main] debug org.springframework.test.annotation.profilevalueutils - retrieved @profilevaluesourceconfiguration [null] for test class [hello.helloworldconfigurationtests]
10:29:06.420 [main] debug org.springframework.test.annotation.profilevalueutils - retrieved profilevaluesource type [class org.springframework.test.annotation.systemprofilevaluesource] for class [hello.helloworldconfigurationtests]
10:29:06.428 [main] debug org.springframework.test.context.support.dependencyinjectiontestexecutionlistener - performing dependency injection for test context [[defaulttestcontext@6a6cb05c testclass = helloworldconfigurationtests, testinstance = hello.helloworldconfigurationtests@217ed35e, testmethod = [null], testexception = [null], mergedcontextconfiguration = [webmergedcontextconfiguration@40a4337a testclass = helloworldconfigurationtests, locations = '{}', classes = '{class hello.application}', contextinitializerclasses = '[]', activeprofiles = '{}', propertysourcelocations = '{}', propertysourceproperties = '{org.springframework.boot.test.context.springboottestcontextbootstrapper=true, server.port=0}', contextcustomizers = set[org.springframework.boot.test.context.filter.excludefiltercontextcustomizer@6950e31, org.springframework.boot.test.json.duplicatejsonobjectcontextcustomizerfactory$duplicatejsonobjectcontextcustomizer@52f759d7, org.springframework.boot.test.mock.mockito.mockitocontextcustomizer@0, org.springframework.boot.test.web.client.testresttemplatecontextcustomizer@396e2f39, org.springframework.boot.test.autoconfigure.properties.propertymappingcontextcustomizer@0, org.springframework.boot.test.autoconfigure.web.servlet.webdrivercontextcustomizerfactory$customizer@67b467e9], resourcebasepath = 'src/main/webapp', contextloader = 'org.springframework.boot.test.context.springbootcontextloader', parent = [null]], attributes = map['org.springframework.test.context.web.servlettestexecutionlistener.activatelistener' -> false]]].
10:29:06.456 [main] debug org.springframework.core.env.standardenvironment - adding propertysource 'systemproperties' with lowest search precedence
10:29:06.456 [main] debug org.springframework.core.env.standardenvironment - adding propertysource 'systemenvironment' with lowest search precedence
10:29:06.457 [main] debug org.springframework.core.env.standardenvironment - initialized standardenvironment with propertysources [mappropertysource@1644231115 {name='systemproperties', properties={java.runtime.name=openjdk runtime environment, sun.boot.library.path=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.171-8.b10.el7_5.x86_64/jre/lib/amd64, java.vm.version=25.171-b10, java.vm.vendor=oracle corporation, java.vendor.url=http://java.oracle.com/, path.separator=:, java.vm.name=openjdk 64-bit server vm, file.encoding.pkg=sun.io, user.country=us, sun.java.launcher=sun_standard, sun.os.patch.level=unknown, java.vm.specification.name=java virtual machine specification, user.dir=/usr/local/gs-spring-boot-docker-master, java.runtime.version=1.8.0_171-b10, basedir=/usr/local/gs-spring-boot-docker-master, java.awt.graphicsenv=sun.awt.x11graphicsenvironment, java.endorsed.dirs=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.171-8.b10.el7_5.x86_64/jre/lib/endorsed, os.arch=amd64, surefire.real.class.path=/usr/local/gs-spring-boot-docker-master/target/surefire/surefirebooter4703757062554335800.jar, java.io.tmpdir=/tmp, line.separator=
, java.vm.specification.vendor=oracle corporation, os.name=linux, sun.jnu.encoding=utf-8, java.library.path=/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib, surefire.test.class.path=/usr/local/gs-spring-boot-docker-master/target/test-classes:/usr/local/gs-spring-boot-docker-master/target/classes:/root/.m2/repository/org/springframework/boot/spring-boot-starter-web/2.0.2.release/spring-boot-starter-web-2.0.2.release.jar:/root/.m2/repository/org/springframework/boot/spring-boot-starter/2.0.2.release/spring-boot-starter-2.0.2.release.jar:/root/.m2/repository/org/springframework/boot/spring-boot/2.0.2.release/spring-boot-2.0.2.release.jar:/root/.m2/repository/org/springframework/boot/spring-boot-autoconfigure/2.0.2.release/spring-boot-autoconfigure-2.0.2.release.jar:/root/.m2/repository/org/springframework/boot/spring-boot-starter-logging/2.0.2.release/spring-boot-starter-logging-2.0.2.release.jar:/root/.m2/repository/ch/qos/logback/logback-classic/1.2.3/logback-classic-1.2.3.jar:/root/.m2/repository/ch/qos/logback/logback-core/1.2.3/logback-core-1.2.3.jar:/root/.m2/repository/org/apache/logging/log4j/log4j-to-slf4j/2.10.0/log4j-to-slf4j-2.10.0.jar:/root/.m2/repository/org/apache/logging/log4j/log4j-api/2.10.0/log4j-api-2.10.0.jar:/root/.m2/repository/org/slf4j/jul-to-slf4j/1.7.25/jul-to-slf4j-1.7.25.jar:/root/.m2/repository/javax/annotation/javax.annotation-api/1.3.2/javax.annotation-api-1.3.2.jar:/root/.m2/repository/org/yaml/snakeyaml/1.19/snakeyaml-1.19.jar:/root/.m2/repository/org/springframework/boot/spring-boot-starter-json/2.0.2.release/spring-boot-starter-json-2.0.2.release.jar:/root/.m2/repository/com/fasterxml/jackson/core/jackson-databind/2.9.5/jackson-databind-2.9.5.jar:/root/.m2/repository/com/fasterxml/jackson/core/jackson-annotations/2.9.0/jackson-annotations-2.9.0.jar:/root/.m2/repository/com/fasterxml/jackson/core/jackson-core/2.9.5/jackson-core-2.9.5.jar:/root/.m2/repository/com/fasterxml/jackson/datatype/jackson-datatype-jdk8/2.9.5/jackson-datatype-jdk8-2.9.5.jar:/root/.m2/repository/com/fasterxml/jackson/datatype/jackson-datatype-jsr310/2.9.5/jackson-datatype-jsr310-2.9.5.jar:/root/.m2/repository/com/fasterxml/jackson/module/jackson-module-parameter-names/2.9.5/jackson-module-parameter-names-2.9.5.jar:/root/.m2/repository/org/springframework/boot/spring-boot-starter-tomcat/2.0.2.release/spring-boot-starter-tomcat-2.0.2.release.jar:/root/.m2/repository/org/apache/tomcat/embed/tomcat-embed-core/8.5.31/tomcat-embed-core-8.5.31.jar:/root/.m2/repository/org/apache/tomcat/embed/tomcat-embed-el/8.5.31/tomcat-embed-el-8.5.31.jar:/root/.m2/repository/org/apache/tomcat/embed/tomcat-embed-websocket/8.5.31/tomcat-embed-websocket-8.5.31.jar:/root/.m2/repository/org/hibernate/validator/hibernate-validator/6.0.9.final/hibernate-validator-6.0.9.final.jar:/root/.m2/repository/javax/validation/validation-api/2.0.1.final/validation-api-2.0.1.final.jar:/root/.m2/repository/org/jboss/logging/jboss-logging/3.3.2.final/jboss-logging-3.3.2.final.jar:/root/.m2/repository/com/fasterxml/classmate/1.3.4/classmate-1.3.4.jar:/root/.m2/repository/org/springframework/spring-web/5.0.6.release/spring-web-5.0.6.release.jar:/root/.m2/repository/org/springframework/spring-beans/5.0.6.release/spring-beans-5.0.6.release.jar:/root/.m2/repository/org/springframework/spring-webmvc/5.0.6.release/spring-webmvc-5.0.6.release.jar:/root/.m2/repository/org/springframework/spring-aop/5.0.6.release/spring-aop-5.0.6.release.jar:/root/.m2/repository/org/springframework/spring-context/5.0.6.release/spring-context-5.0.6.release.jar:/root/.m2/repository/org/springframework/spring-expression/5.0.6.release/spring-expression-5.0.6.release.jar:/root/.m2/repository/org/springframework/boot/spring-boot-starter-test/2.0.2.release/spring-boot-starter-test-2.0.2.release.jar:/root/.m2/repository/org/springframework/boot/spring-boot-test/2.0.2.release/spring-boot-test-2.0.2.release.jar:/root/.m2/repository/org/springframework/boot/spring-boot-test-autoconfigure/2.0.2.release/spring-boot-test-autoconfigure-2.0.2.release.jar:/root/.m2/repository/com/jayway/jsonpath/json-path/2.4.0/json-path-2.4.0.jar:/root/.m2/repository/net/minidev/json-smart/2.3/json-smart-2.3.jar:/root/.m2/repository/net/minidev/accessors-smart/1.2/accessors-smart-1.2.jar:/root/.m2/repository/org/ow2/asm/asm/5.0.4/asm-5.0.4.jar:/root/.m2/repository/org/slf4j/slf4j-api/1.7.25/slf4j-api-1.7.25.jar:/root/.m2/repository/junit/junit/4.12/junit-4.12.jar:/root/.m2/repository/org/assertj/assertj-core/3.9.1/assertj-core-3.9.1.jar:/root/.m2/repository/org/mockito/mockito-core/2.15.0/mockito-core-2.15.0.jar:/root/.m2/repository/net/bytebuddy/byte-buddy/1.7.11/byte-buddy-1.7.11.jar:/root/.m2/repository/net/bytebuddy/byte-buddy-agent/1.7.11/byte-buddy-agent-1.7.11.jar:/root/.m2/repository/org/objenesis/objenesis/2.6/objenesis-2.6.jar:/root/.m2/repository/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar:/root/.m2/repository/org/hamcrest/hamcrest-library/1.3/hamcrest-library-1.3.jar:/root/.m2/repository/org/skyscreamer/jsonassert/1.5.0/jsonassert-1.5.0.jar:/root/.m2/repository/com/vaadin/external/google/android-json/0.0.20131108.vaadin1/android-json-0.0.20131108.vaadin1.jar:/root/.m2/repository/org/springframework/spring-core/5.0.6.release/spring-core-5.0.6.release.jar:/root/.m2/repository/org/springframework/spring-jcl/5.0.6.release/spring-jcl-5.0.6.release.jar:/root/.m2/repository/org/springframework/spring-test/5.0.6.release/spring-test-5.0.6.release.jar:/root/.m2/repository/org/xmlunit/xmlunit-core/2.5.1/xmlunit-core-2.5.1.jar:, java.specification.name=java platform api specification, java.class.version=52.0, sun.management.compiler=hotspot 64-bit tiered compilers, os.version=3.10.0-693.2.2.el7.x86_64, user.home=/root, user.timezone=asia/shanghai, java.awt.printerjob=sun.print.psprinterjob, file.encoding=utf-8, java.specification.version=1.8, java.class.path=/usr/local/gs-spring-boot-docker-master/target/test-classes:/usr/local/gs-spring-boot-docker-master/target/classes:/root/.m2/repository/org/springframework/boot/spring-boot-starter-web/2.0.2.release/spring-boot-starter-web-2.0.2.release.jar:/root/.m2/repository/org/springframework/boot/spring-boot-starter/2.0.2.release/spring-boot-starter-2.0.2.release.jar:/root/.m2/repository/org/springframework/boot/spring-boot/2.0.2.release/spring-boot-2.0.2.release.jar:/root/.m2/repository/org/springframework/boot/spring-boot-autoconfigure/2.0.2.release/spring-boot-autoconfigure-2.0.2.release.jar:/root/.m2/repository/org/springframework/boot/spring-boot-starter-logging/2.0.2.release/spring-boot-starter-logging-2.0.2.release.jar:/root/.m2/repository/ch/qos/logback/logback-classic/1.2.3/logback-classic-1.2.3.jar:/root/.m2/repository/ch/qos/logback/logback-core/1.2.3/logback-core-1.2.3.jar:/root/.m2/repository/org/apache/logging/log4j/log4j-to-slf4j/2.10.0/log4j-to-slf4j-2.10.0.jar:/root/.m2/repository/org/apache/logging/log4j/log4j-api/2.10.0/log4j-api-2.10.0.jar:/root/.m2/repository/org/slf4j/jul-to-slf4j/1.7.25/jul-to-slf4j-1.7.25.jar:/root/.m2/repository/javax/annotation/javax.annotation-api/1.3.2/javax.annotation-api-1.3.2.jar:/root/.m2/repository/org/yaml/snakeyaml/1.19/snakeyaml-1.19.jar:/root/.m2/repository/org/springframework/boot/spring-boot-starter-json/2.0.2.release/spring-boot-starter-json-2.0.2.release.jar:/root/.m2/repository/com/fasterxml/jackson/core/jackson-databind/2.9.5/jackson-databind-2.9.5.jar:/root/.m2/repository/com/fasterxml/jackson/core/jackson-annotations/2.9.0/jackson-annotations-2.9.0.jar:/root/.m2/repository/com/fasterxml/jackson/core/jackson-core/2.9.5/jackson-core-2.9.5.jar:/root/.m2/repository/com/fasterxml/jackson/datatype/jackson-datatype-jdk8/2.9.5/jackson-datatype-jdk8-2.9.5.jar:/root/.m2/repository/com/fasterxml/jackson/datatype/jackson-datatype-jsr310/2.9.5/jackson-datatype-jsr310-2.9.5.jar:/root/.m2/repository/com/fasterxml/jackson/module/jackson-module-parameter-names/2.9.5/jackson-module-parameter-names-2.9.5.jar:/root/.m2/repository/org/springframework/boot/spring-boot-starter-tomcat/2.0.2.release/spring-boot-starter-tomcat-2.0.2.release.jar:/root/.m2/repository/org/apache/tomcat/embed/tomcat-embed-core/8.5.31/tomcat-embed-core-8.5.31.jar:/root/.m2/repository/org/apache/tomcat/embed/tomcat-embed-el/8.5.31/tomcat-embed-el-8.5.31.jar:/root/.m2/repository/org/apache/tomcat/embed/tomcat-embed-websocket/8.5.31/tomcat-embed-websocket-8.5.31.jar:/root/.m2/repository/org/hibernate/validator/hibernate-validator/6.0.9.final/hibernate-validator-6.0.9.final.jar:/root/.m2/repository/javax/validation/validation-api/2.0.1.final/validation-api-2.0.1.final.jar:/root/.m2/repository/org/jboss/logging/jboss-logging/3.3.2.final/jboss-logging-3.3.2.final.jar:/root/.m2/repository/com/fasterxml/classmate/1.3.4/classmate-1.3.4.jar:/root/.m2/repository/org/springframework/spring-web/5.0.6.release/spring-web-5.0.6.release.jar:/root/.m2/repository/org/springframework/spring-beans/5.0.6.release/spring-beans-5.0.6.release.jar:/root/.m2/repository/org/springframework/spring-webmvc/5.0.6.release/spring-webmvc-5.0.6.release.jar:/root/.m2/repository/org/springframework/spring-aop/5.0.6.release/spring-aop-5.0.6.release.jar:/root/.m2/repository/org/springframework/spring-context/5.0.6.release/spring-context-5.0.6.release.jar:/root/.m2/repository/org/springframework/spring-expression/5.0.6.release/spring-expression-5.0.6.release.jar:/root/.m2/repository/org/springframework/boot/spring-boot-starter-test/2.0.2.release/spring-boot-starter-test-2.0.2.release.jar:/root/.m2/repository/org/springframework/boot/spring-boot-test/2.0.2.release/spring-boot-test-2.0.2.release.jar:/root/.m2/repository/org/springframework/boot/spring-boot-test-autoconfigure/2.0.2.release/spring-boot-test-autoconfigure-2.0.2.release.jar:/root/.m2/repository/com/jayway/jsonpath/json-path/2.4.0/json-path-2.4.0.jar:/root/.m2/repository/net/minidev/json-smart/2.3/json-smart-2.3.jar:/root/.m2/repository/net/minidev/accessors-smart/1.2/accessors-smart-1.2.jar:/root/.m2/repository/org/ow2/asm/asm/5.0.4/asm-5.0.4.jar:/root/.m2/repository/org/slf4j/slf4j-api/1.7.25/slf4j-api-1.7.25.jar:/root/.m2/repository/junit/junit/4.12/junit-4.12.jar:/root/.m2/repository/org/assertj/assertj-core/3.9.1/assertj-core-3.9.1.jar:/root/.m2/repository/org/mockito/mockito-core/2.15.0/mockito-core-2.15.0.jar:/root/.m2/repository/net/bytebuddy/byte-buddy/1.7.11/byte-buddy-1.7.11.jar:/root/.m2/repository/net/bytebuddy/byte-buddy-agent/1.7.11/byte-buddy-agent-1.7.11.jar:/root/.m2/repository/org/objenesis/objenesis/2.6/objenesis-2.6.jar:/root/.m2/repository/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar:/root/.m2/repository/org/hamcrest/hamcrest-library/1.3/hamcrest-library-1.3.jar:/root/.m2/repository/org/skyscreamer/jsonassert/1.5.0/jsonassert-1.5.0.jar:/root/.m2/repository/com/vaadin/external/google/android-json/0.0.20131108.vaadin1/android-json-0.0.20131108.vaadin1.jar:/root/.m2/repository/org/springframework/spring-core/5.0.6.release/spring-core-5.0.6.release.jar:/root/.m2/repository/org/springframework/spring-jcl/5.0.6.release/spring-jcl-5.0.6.release.jar:/root/.m2/repository/org/springframework/spring-test/5.0.6.release/spring-test-5.0.6.release.jar:/root/.m2/repository/org/xmlunit/xmlunit-core/2.5.1/xmlunit-core-2.5.1.jar:, user.name=root, java.vm.specification.version=1.8, sun.java.command=/usr/local/gs-spring-boot-docker-master/target/surefire/surefirebooter4703757062554335800.jar /usr/local/gs-spring-boot-docker-master/target/surefire 2018-06-21t10-29-04_776-jvmrun1 surefire2306677988440424207tmp surefire_06445366462775442424tmp, java.home=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.171-8.b10.el7_5.x86_64/jre, sun.arch.data.model=64, user.language=en, java.specification.vendor=oracle corporation, awt.toolkit=sun.awt.x11.xtoolkit, java.vm.info=mixed mode, java.version=1.8.0_171, java.ext.dirs=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.171-8.b10.el7_5.x86_64/jre/lib/ext:/usr/java/packages/lib/ext, sun.boot.class.path=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.171-8.b10.el7_5.x86_64/jre/lib/resources.jar:/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.171-8.b10.el7_5.x86_64/jre/lib/rt.jar:/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.171-8.b10.el7_5.x86_64/jre/lib/sunrsasign.jar:/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.171-8.b10.el7_5.x86_64/jre/lib/jsse.jar:/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.171-8.b10.el7_5.x86_64/jre/lib/jce.jar:/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.171-8.b10.el7_5.x86_64/jre/lib/charsets.jar:/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.171-8.b10.el7_5.x86_64/jre/lib/jfr.jar:/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.171-8.b10.el7_5.x86_64/jre/classes, java.vendor=oracle corporation, localrepository=/root/.m2/repository, file.separator=/, java.vendor.url.bug=http://bugreport.sun.com/bugreport/, sun.io.unicode.encoding=unicodelittle, sun.cpu.endian=little, sun.cpu.isalist=}}, systemenvironmentpropertysource@537066525 {name='systemenvironment', properties={path=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin, histcontrol=ignoredups, lessopen=||/usr/bin/lesspipe.sh %s, shell=/bin/bash, histsize=1000, java_home=/usr/lib/jvm/java, ssh_tty=/dev/pts/0, ssh_client=49.66.150.128 7775 22, oldpwd=/usr/local/gs-spring-boot-docker-master, term=xterm, user=root,.utf-8, xdg_session_id=1180, ssh_connection=49.66.150.128 7775 172.17.69.217 22, mail=/var/spool/mail/root, hostname=iz2zeh5mjwg5u2vl2fawchz, m2_home=/usr/share/maven, logname=root, xdg_runtime_dir=/run/user/0, pwd=/usr/local/gs-spring-boot-docker-master, ls_colors=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=01;05;37;41:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=01;36:*.au=01;36:*.flac=01;36:*.mid=01;36:*.midi=01;36:*.mka=01;36:*.mp3=01;36:*.mpc=01;36:*.ogg=01;36:*.ra=01;36:*.wav=01;36:*.axa=01;36:*.oga=01;36:*.spx=01;36:*.xspf=01;36:, home=/root, shlvl=3, _=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.171-8.b10.el7_5.x86_64/jre/bin/java}}]
10:29:06.458 [main] debug org.springframework.test.context.support.testpropertysourceutils - adding inlined properties to environment: {spring.jmx.enabled=false, org.springframework.boot.test.context.springboottestcontextbootstrapper=true, server.port=0}
10:29:06.458 [main] debug org.springframework.core.env.standardenvironment - adding propertysource 'inlined test properties' with highest search precedence

 . ____   _   __ _ _
 /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/ ___)| |_)| | | | | || (_| | ) ) ) )
 ' |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: spring boot ::  (v2.0.2.release)

2018-06-21 10:29:07.584 info 2207 --- [   main] hello.helloworldconfigurationtests  : starting helloworldconfigurationtests on iz2zeh5mjwg5u2vl2fawchz with pid 2207 (started by root in /usr/local/gs-spring-boot-docker-master)
2018-06-21 10:29:07.585 info 2207 --- [   main] hello.helloworldconfigurationtests  : no active profile set, falling back to default profiles: default
2018-06-21 10:29:07.677 info 2207 --- [   main] configservletwebserverapplicationcontext : refreshing org.springframework.boot.web.servlet.context.annotationconfigservletwebserverapplicationcontext@46d59067: startup date [thu jun 21 10:29:07 cst 2018]; root of context hierarchy
2018-06-21 10:29:10.849 info 2207 --- [   main] o.s.b.w.embedded.tomcat.tomcatwebserver : tomcat initialized with port(s): 0 (http)
2018-06-21 10:29:10.897 info 2207 --- [   main] o.apache.catalina.core.standardservice : starting service [tomcat]
2018-06-21 10:29:10.897 info 2207 --- [   main] org.apache.catalina.core.standardengine : starting servlet engine: apache tomcat/8.5.31
2018-06-21 10:29:10.912 info 2207 --- [ost-startstop-1] o.a.catalina.core.aprlifecyclelistener : the apr based apache tomcat native library which allows optimal performance in production environments was not found on the java.library.path: [/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib]
2018-06-21 10:29:11.108 info 2207 --- [ost-startstop-1] o.a.c.c.c.[tomcat].[localhost].[/]  : initializing spring embedded webapplicationcontext
2018-06-21 10:29:11.109 info 2207 --- [ost-startstop-1] o.s.web.context.contextloader   : root webapplicationcontext: initialization completed in 3448 ms
2018-06-21 10:29:11.319 info 2207 --- [ost-startstop-1] o.s.b.w.servlet.servletregistrationbean : servlet dispatcherservlet mapped to [/]
2018-06-21 10:29:11.322 info 2207 --- [ost-startstop-1] o.s.b.w.servlet.filterregistrationbean : mapping filter: 'characterencodingfilter' to: [/*]
2018-06-21 10:29:11.322 info 2207 --- [ost-startstop-1] o.s.b.w.servlet.filterregistrationbean : mapping filter: 'hiddenhttpmethodfilter' to: [/*]
2018-06-21 10:29:11.322 info 2207 --- [ost-startstop-1] o.s.b.w.servlet.filterregistrationbean : mapping filter: 'httpputformcontentfilter' to: [/*]
2018-06-21 10:29:11.322 info 2207 --- [ost-startstop-1] o.s.b.w.servlet.filterregistrationbean : mapping filter: 'requestcontextfilter' to: [/*]
2018-06-21 10:29:11.537 info 2207 --- [   main] o.s.w.s.handler.simpleurlhandlermapping : mapped url path [/**/favicon.ico] onto handler of type [class org.springframework.web.servlet.resource.resourcehttprequesthandler]
2018-06-21 10:29:12.139 info 2207 --- [   main] s.w.s.m.m.a.requestmappinghandleradapter : looking for @controlleradvice: org.springframework.boot.web.servlet.context.annotationconfigservletwebserverapplicationcontext@46d59067: startup date [thu jun 21 10:29:07 cst 2018]; root of context hierarchy
2018-06-21 10:29:12.280 info 2207 --- [   main] s.w.s.m.m.a.requestmappinghandlermapping : mapped "{[/]}" onto public java.lang.string hello.application.home()
2018-06-21 10:29:12.283 info 2207 --- [   main] s.w.s.m.m.a.requestmappinghandlermapping : mapped "{[/error],produces=[text/html]}" onto public org.springframework.web.servlet.modelandview org.springframework.boot.autoconfigure.web.servlet.error.basicerrorcontroller.errorhtml(javax.servlet.http.httpservletrequest,javax.servlet.http.httpservletresponse)
2018-06-21 10:29:12.283 info 2207 --- [   main] s.w.s.m.m.a.requestmappinghandlermapping : mapped "{[/error]}" onto public org.springframework.http.responseentity> org.springframework.boot.autoconfigure.web.servlet.error.basicerrorcontroller.error(javax.servlet.http.httpservletrequest)
2018-06-21 10:29:12.329 info 2207 --- [   main] o.s.w.s.handler.simpleurlhandlermapping : mapped url path [/webjars/**] onto handler of type [class org.springframework.web.servlet.resource.resourcehttprequesthandler]
2018-06-21 10:29:12.329 info 2207 --- [   main] o.s.w.s.handler.simpleurlhandlermapping : mapped url path [/**] onto handler of type [class org.springframework.web.servlet.resource.resourcehttprequesthandler]
2018-06-21 10:29:12.888 info 2207 --- [   main] o.s.b.w.embedded.tomcat.tomcatwebserver : tomcat started on port(s): 38552 (http) with context path ''
2018-06-21 10:29:12.896 info 2207 --- [   main] hello.helloworldconfigurationtests  : started helloworldconfigurationtests in 6.436 seconds (jvm running for 7.787)
2018-06-21 10:29:13.443 info 2207 --- [o-auto-1-exec-1] o.a.c.c.c.[tomcat].[localhost].[/]  : initializing spring frameworkservlet 'dispatcherservlet'
2018-06-21 10:29:13.444 info 2207 --- [o-auto-1-exec-1] o.s.web.servlet.dispatcherservlet  : frameworkservlet 'dispatcherservlet': initialization started
2018-06-21 10:29:13.461 info 2207 --- [o-auto-1-exec-1] o.s.web.servlet.dispatcherservlet  : frameworkservlet 'dispatcherservlet': initialization completed in 17 ms
2018-06-21 10:29:13.522 info 2207 --- [   main] configservletwebserverapplicationcontext : closing org.springframework.boot.web.servlet.context.annotationconfigservletwebserverapplicationcontext@46d59067: startup date [thu jun 21 10:29:07 cst 2018]; root of context hierarchy
[info] tests run: 1, failures: 0, errors: 0, skipped: 0, time elapsed: 8.124 s - in hello.helloworldconfigurationtests
[info]
[info] results:
[info]
[info] tests run: 1, failures: 0, errors: 0, skipped: 0
[info]
[info]
[info] --- maven-jar-plugin:3.0.2:jar (default-jar) @ gs-spring-boot-docker-master ---
[info] building jar: /usr/local/gs-spring-boot-docker-master/target/gs-spring-boot-docker-master-0.0.1-snapshot.jar
[info]
[info] --- spring-boot-maven-plugin:2.0.2.release:repackage (default) @ gs-spring-boot-docker-master ---
[info]
[info] --- docker-maven-plugin:0.4.13:build (default-cli) @ gs-spring-boot-docker-master ---
slf4j: failed to load class "org.slf4j.impl.staticloggerbinder".
slf4j: defaulting to no-operation (nop) logger implementation
slf4j: see http://www.slf4j.org/codes.html#staticloggerbinder for further details.
[info] copying /usr/local/gs-spring-boot-docker-master/target/gs-spring-boot-docker-master-0.0.1-snapshot.jar -> /usr/local/gs-spring-boot-docker-master/target/docker/gs-spring-boot-docker-master-0.0.1-snapshot.jar
[info] copying src/main/docker/dockerfile -> /usr/local/gs-spring-boot-docker-master/target/docker/dockerfile
[info] building image springio/gs-spring-boot-docker-master
step 1/6 : from frolvlad/alpine-oraclejdk8:slim
 ---> d181699b91d1
step 2/6 : volume /tmp
 ---> using cache
 ---> b286013f5637
step 3/6 : add gs-spring-boot-docker-master-0.0.1-snapshot.jar app.jar
 ---> fa57b59bd6ce
removing intermediate container 5e8f920aaf0b
step 4/6 : run sh -c 'touch /app.jar'
 ---> running in 262ca4a9b39d
progressmessage{id=null, status=null, stream=null, error=null, progress=null, progressdetail=null}

 ---> 8b562204cb2c
removing intermediate container 262ca4a9b39d
step 5/6 : env java_opts ""
 ---> running in 19a713bcc1fa
 ---> 772752e84c58
removing intermediate container 19a713bcc1fa
step 6/6 : entrypoint sh -c java $java_opts -djava.security.egd=file:/dev/./urandom -jar /app.jar
 ---> running in e43743f6b521
 ---> 831237777bc5
removing intermediate container e43743f6b521
successfully built 831237777bc5
[info] built springio/gs-spring-boot-docker-master
[info] ------------------------------------------------------------------------
[info] build success
[info] ------------------------------------------------------------------------
[info] total time: 32.046s
[info] finished at: thu jun 21 10:29:30 cst 2018
[info] final memory: 34m/83m
[info] ------------------------------------------------------------------------

看到build success说明该项目的镜像创建成功,查看一下

[root@iz2zeh5mjwg5u2vl2fawchz gs-spring-boot-docker-master]# docker images
repository           tag     image id   created    size
springio/gs-spring-boot-docker-master    latest    ab5a39fb7e76  12 minutes ago  200 mb
hello_springboot          0.0.1    bfda58a07fad  about an hour ago 184 mb
hello_springboot          latest    6f7ebf23d1d8  about an hour ago 184 mb
xbf/hello-nginx          latest    2230ac934a5f  2 days ago   179 mb
hello_docker           latest    65d690c9d782  2 days ago   4.15 mb
docker.io/openjdk         8-jdk-alpine  6a6a75aac6c9  3 days ago   102 mb
docker.io/ubuntu          latest    113a43faa138  13 days ago   81.2 mb
docker.io/nginx          latest    cd5239a0906a  13 days ago   109 mb
docker.io/centos          latest    49f7960eb7e4  2 weeks ago   200 mb
docker.io/frolvlad/alpine-oraclejdk8     slim    d181699b91d1  4 weeks ago   168 mb
docker.io/stephenreed/jenkins-java8-maven-git  latest    3670d4afa617  2 months ago  682 mb
docker.io/alpine          latest    3fd9065eaf02  5 months ago  4.15 mb
docker.io/stephenreed/java8-jenkins-maven-git-nano latest    508ef553bf1a  3 years ago   1.5 gb

第一行就是的,运行该镜像

[root@iz2zeh5mjwg5u2vl2fawchz gs-spring-boot-docker-master]# docker run -p 8010:8010 -t springio/gs-spring-boot-docker-master
. ____   _   __ _ _
 /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/ ___)| |_)| | | | | || (_| | ) ) ) )
 ' |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: spring boot ::  (v2.0.2.release)

2018-06-21 02:29:59.049 info 5 --- [   main] hello.application      : starting application v0.0.1-snapshot on f4e12d5ec4dc with pid 5 (/app.jar started by root in /)
2018-06-21 02:29:59.052 info 5 --- [   main] hello.application      : no active profile set, falling back to default profiles: default
2018-06-21 02:29:59.217 info 5 --- [   main] configservletwebserverapplicationcontext : refreshing org.springframework.boot.web.servlet.context.annotationconfigservletwebserverapplicationcontext@42f30e0a: startup date [thu jun 21 02:29:59 gmt 2018]; root of context hierarchy
2018-06-21 02:30:02.453 info 5 --- [   main] o.s.b.w.embedded.tomcat.tomcatwebserver : tomcat initialized with port(s): 8010 (http)
2018-06-21 02:30:02.520 info 5 --- [   main] o.apache.catalina.core.standardservice : starting service [tomcat]
2018-06-21 02:30:02.521 info 5 --- [   main] org.apache.catalina.core.standardengine : starting servlet engine: apache tomcat/8.5.31
2018-06-21 02:30:02.555 info 5 --- [ost-startstop-1] o.a.catalina.core.aprlifecyclelistener : the apr based apache tomcat native library which allows optimal performance in production environments was not found on the java.library.path: [/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib]
2018-06-21 02:30:02.759 info 5 --- [ost-startstop-1] o.a.c.c.c.[tomcat].[localhost].[/]  : initializing spring embedded webapplicationcontext
2018-06-21 02:30:02.760 info 5 --- [ost-startstop-1] o.s.web.context.contextloader   : root webapplicationcontext: initialization completed in 3545 ms
2018-06-21 02:30:02.978 info 5 --- [ost-startstop-1] o.s.b.w.servlet.servletregistrationbean : servlet dispatcherservlet mapped to [/]
2018-06-21 02:30:02.992 info 5 --- [ost-startstop-1] o.s.b.w.servlet.filterregistrationbean : mapping filter: 'characterencodingfilter' to: [/*]
2018-06-21 02:30:02.993 info 5 --- [ost-startstop-1] o.s.b.w.servlet.filterregistrationbean : mapping filter: 'hiddenhttpmethodfilter' to: [/*]
2018-06-21 02:30:02.993 info 5 --- [ost-startstop-1] o.s.b.w.servlet.filterregistrationbean : mapping filter: 'httpputformcontentfilter' to: [/*]
2018-06-21 02:30:02.993 info 5 --- [ost-startstop-1] o.s.b.w.servlet.filterregistrationbean : mapping filter: 'requestcontextfilter' to: [/*]
2018-06-21 02:30:03.249 info 5 --- [   main] o.s.w.s.handler.simpleurlhandlermapping : mapped url path [/**/favicon.ico] onto handler of type [class org.springframework.web.servlet.resource.resourcehttprequesthandler]
2018-06-21 02:30:03.735 info 5 --- [   main] s.w.s.m.m.a.requestmappinghandleradapter : looking for @controlleradvice: org.springframework.boot.web.servlet.context.annotationconfigservletwebserverapplicationcontext@42f30e0a: startup date [thu jun 21 02:29:59 gmt 2018]; root of context hierarchy
2018-06-21 02:30:03.904 info 5 --- [   main] s.w.s.m.m.a.requestmappinghandlermapping : mapped "{[/]}" onto public java.lang.string hello.application.home()
2018-06-21 02:30:03.920 info 5 --- [   main] s.w.s.m.m.a.requestmappinghandlermapping : mapped "{[/error],produces=[text/html]}" onto public org.springframework.web.servlet.modelandview org.springframework.boot.autoconfigure.web.servlet.error.basicerrorcontroller.errorhtml(javax.servlet.http.httpservletrequest,javax.servlet.http.httpservletresponse)
2018-06-21 02:30:03.921 info 5 --- [   main] s.w.s.m.m.a.requestmappinghandlermapping : mapped "{[/error]}" onto public org.springframework.http.responseentity> org.springframework.boot.autoconfigure.web.servlet.error.basicerrorcontroller.error(javax.servlet.http.httpservletrequest)
2018-06-21 02:30:03.952 info 5 --- [   main] o.s.w.s.handler.simpleurlhandlermapping : mapped url path [/webjars/**] onto handler of type [class org.springframework.web.servlet.resource.resourcehttprequesthandler]
2018-06-21 02:30:03.953 info 5 --- [   main] o.s.w.s.handler.simpleurlhandlermapping : mapped url path [/**] onto handler of type [class org.springframework.web.servlet.resource.resourcehttprequesthandler]
2018-06-21 02:30:04.240 info 5 --- [   main] o.s.j.e.a.annotationmbeanexporter  : registering beans for jmx exposure on startup
2018-06-21 02:30:04.323 info 5 --- [   main] o.s.b.w.embedded.tomcat.tomcatwebserver : tomcat started on port(s): 8010 (http) with context path ''
2018-06-21 02:30:04.332 info 5 --- [   main] hello.application      : started application in 6.932 seconds (jvm running for 8.504)
2018-06-21 02:33:15.269 info 5 --- [nio-8010-exec-1] o.a.c.c.c.[tomcat].[localhost].[/]  : initializing spring frameworkservlet 'dispatcherservlet'
2018-06-21 02:33:15.269 info 5 --- [nio-8010-exec-1] o.s.web.servlet.dispatcherservlet  : frameworkservlet 'dispatcherservlet': initialization started
2018-06-21 02:33:15.321 info 5 --- [nio-8010-exec-1] o.s.web.servlet.dispatcherservlet  : frameworkservlet 'dispatcherservlet': initialization completed in 52 ms

看到这个spring的图标。就以为这我们在docker 上发布spring boot 程序已经完成。

接下来去访问在浏览器访问,可以看到页面 “hello docker world.” 字样。

springboot怎么整合docker构建Docker镜像

本文内容来源于互联网,如有侵权请联系删除。
作者最新文章
编程开发 Docker
相关文章 更多
using namespace 使用中遇到的问题怎么解决
using namespace 使用中遇到的问题怎么解决

命名空间的基本概念与常见引入问题在C++等编程语言中,命名空间(namespace)是一种将代码标识符(如变量、函数、类名)封装在特定名称下的机制,其主要目的是避免命名冲突,尤其是在大型项目或使用多个第三方库时。使用“using namespace”指令可以将指定命名空间中的所有名称引入当前作用域,

c语言函数递归 实操经验总结:这些技巧很实用
c语言函数递归 实操经验总结:这些技巧很实用

理解递归的基本原理在C语言中,递归是一种函数调用自身的编程技术。要掌握它,首先需要理解其核心思想:将一个复杂的大问题,分解为一个或几个与原问题相似但规模更小的子问题,直到子问题足够简单,可以直接求解。这个过程通常包含两个关键部分:递归出口和递归体。递归出口定义了问题何时不再继续分解,即最简单、可直接

c语言函数递归 怎么选?常见方案对比分析
c语言函数递归 怎么选?常见方案对比分析

递归函数的基本概念与适用场景在C语言编程中,递归是一种函数调用自身的编程技巧。它并非适用于所有问题,但在处理某些具有自相似结构的问题时,能提供极其清晰和优雅的解决方案。递归的核心思想是将一个大规模问题分解为一个或多个同类型但规模更小的子问题,直到子问题简单到可以直接求解。典型的适用场景包括树形结构的

Objective-C 内存管理入门:从 alloc 到 dealloc 的生命周期详解
Objective-C 内存管理入门:从 alloc 到 dealloc 的生命周期详解

理解内存管理的基石在Objective-C的编程世界中,内存管理是开发者必须掌握的核心技能之一。它直接关系到应用的性能、稳定性与资源利用效率。与一些采用自动垃圾回收机制的语言不同,Objective-C在很长一段时间里,依赖一套基于引用计数的、需要开发者部分介入的管理规则。这套规则的核心思想是明确的

如何正确使用 dealloc 以避免 iOS 应用中的内存泄漏
如何正确使用 dealloc 以避免 iOS 应用中的内存泄漏

理解 dealloc 的角色与时机在 iOS 应用开发中,内存管理是保障应用性能与稳定性的基石。dealloc 方法是 Objective-C 中对象生命周期结束时的关键回调,它标志着对象即将被系统回收内存。正确理解其触发时机至关重要:当一个对象的引用计数降为零时,运行时系统会自动调用该对象的 de

深入理解 Objective-C 中的 dealloc 方法:内存管理核心机制
深入理解 Objective-C 中的 dealloc 方法:内存管理核心机制

内存管理的基石在Objective-C的世界里,内存管理是开发者必须掌握的核心技能之一。作为一门在手动引用计数(MRC)时代诞生的语言,Objective-C要求程序员对对象的生命周期有清晰的认识。dealloc方法正是这一生命周期中至关重要的终点站。它是一个实例方法,当对象的引用计数降为零时,系统

理解 native2ascii:Java 国际化开发中的字符编码工具
理解 native2ascii:Java 国际化开发中的字符编码工具

native2ascii 工具的基本定位在Ja va应用程序的国际化与本地化开发过程中,处理非拉丁字符集是一个常见且关键的环节。Ja va内部使用Unicode字符集来统一表示全球各种语言的文字,但其属性文件(.properties)在历史上要求使用ASCII编码,或者更准确地说,要求非ASCII字

如何使用 native2ascii 转换中文字符为 Unicode 转义序列
如何使用 native2ascii 转换中文字符为 Unicode 转义序列

理解 native2ascii 工具的基本用途在软件开发,特别是涉及国际化处理的场景中,开发者常常需要处理不同编码的文本资源。native2ascii 是 Ja va 开发工具包(JDK)中提供的一个命令行实用程序,其主要功能是将包含本地字符编码(非ASCII字符)的文件,转换为包含 Unicode

Java native2ascii 命令详解:解决属性文件乱码问题
Java native2ascii 命令详解:解决属性文件乱码问题

native2ascii 命令的由来与作用在Ja va开发中,处理国际化资源文件是一个常见需求。资源文件通常以.properties格式存储,用于支持多语言界面。然而,Ja va属性文件默认采用ISO-8859-1字符集编码,这导致了一个直接的问题:当文件中包含非拉丁字符(如中文、日文、韩文等)时,

一个 memwatch 实战案例:定位野指针问题
一个 memwatch 实战案例:定位野指针问题

内存监控工具的价值与挑战在软件开发,尤其是使用C/C++这类手动管理内存的语言时,内存错误是程序员最常遭遇的难题之一。其中,野指针问题因其隐蔽性和破坏性,往往成为最难定位的“幽灵”缺陷。它可能潜伏在代码中,在特定条件下才被触发,导致程序崩溃、数据损坏或难以预测的行为。传统的调试手段,如打印日志或使用

查看更多
精品专题 更多
装机必备
装机必备

正软商城装机必备专区,精选办公、浏览器、安全防护、影音播放、压缩解压、设计创作和系统工具等电脑常用正版软件,帮助用户快速完成新电脑软件配置。

Windows
Windows

正软商城Windows软件专区,汇集适用于Windows电脑的办公、设计、安全防护、影音播放、开发工具和系统优化软件,提供软件介绍、系统要求、正版授权及购买下载服务。

macOS软件
macOS软件

正软商城macOS软件专区,精选适用于Mac电脑的办公、设计、影音、效率、开发和系统工具,提供软件功能介绍、macOS兼容版本、正版授权及购买下载服务。

Mac软件 更多
灵活计算器
灵活计算器
macOS/iOS/Android

灵活计算器是一款笔记式算数应用,支持实时计算、动态关联和云端同步功能。记录、整理和输出之间的过渡会更自然,适合长期写作、做笔记或持续沉淀个人内容。

赤友清理大师
赤友清理大师
macOS

赤友清理大师是一款为 Mac 设计的智能清理优化工具,可精准扫描垃圾、大文件、重复文件等,释放磁盘空间。做扫描整理、文字提取和表格转换时,它能把识别后的处理步骤接得更顺,资料录入这类场景会省下不少时间。

极度公式
极度公式
Windows/macOS/Linux

极度公式是一款跨平台专业LaTeX公式识别编辑软件,支持OCR公式识别和多平台编辑。和使用说明,避免使用,享受完整功能与稳定支持。做扫描整理、文字提取和表格转换时,它能把识别后的处理步骤接得更顺,资料录入这类场景会省下不少时间。

WINDOWS 更多
Windows 10
Windows 10
Windows

Windows 10 是一款微软推出的经典操作系统,拥有硬件兼容性与多任务处理能力。它更偏向把系统状态查看和常用调节动作放在一起,适合需要持续观察和微调设备状态的场景。

极度公式
极度公式
Windows/macOS/Linux

极度公式是一款跨平台专业LaTeX公式识别编辑软件,支持OCR公式识别和多平台编辑。和使用说明,避免使用,享受完整功能与稳定支持。做扫描整理、文字提取和表格转换时,它能把识别后的处理步骤接得更顺,资料录入这类场景会省下不少时间。

密码键盘
密码键盘
Windows/macOS/iOS/Android

密码键盘是一款兼具安全性与便捷性的高效密码管理器。日常使用里的持续防护和信息管理会更突出,适合把安全控制放进长期使用流程中的场景。