quarkus进行容器构建

创建一个项目:

$ mvn io.quarkus:quarkus-maven-plugin:1.5.1.Final:create \
    -DprojectGroupId=org.acme \
    -DprojectArtifactId=getting-started \
    -DclassName="org.acme.getting.started.GreetingResource" \
    -Dpath="/hello"

添加创建docker image的extension:

$ ./mvnw quarkus:add-extension -Dextensions="container-image-docker"

构建docker image:

$ ./mvnw clean package -Dquarkus.container-image.build=true

构建结果:

查看bulid好的image:

使用build好的image创建container:

$ docker run -p 8080:8080 weli/getting-started:1.0-SNAPSHOT

访问服务:

$ http localhost:8080 | head

Powered by Jekyll and Theme by solid