• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

codecentric/springboot-maven3-centos: S2I builder image for building and running ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

codecentric/springboot-maven3-centos

开源软件地址(OpenSource Url):

https://github.com/codecentric/springboot-maven3-centos

开源编程语言(OpenSource Language):

Shell 72.7%

开源软件介绍(OpenSource Introduction):

Spring Boot - Maven 3 - CentOS Docker image

Build Status

This repository contains the sources and Dockerfile of the base image for deploying Spring Boot applications as reproducible Docker images. The resulting images can be run either by Docker or using S2I.

This image is heavily inspired by the awesome openshift/sti-ruby builder images.

Usage

To build a simple springboot-sample-app application using standalone S2I and then run the resulting image with Docker execute:

$ s2i build git://github.com/codecentric/springboot-sample-app codecentric/springboot-maven3-centos springboot-sample-app
$ docker run -p 8080:8080 springboot-sample-app

Accessing the application:

$ curl 127.0.0.1:8080

Repository organization

  • s2i/bin/

    This folder contains scripts that are run by S2I:

    • assemble

      Is used to restore the build artifacts from the previous built (in case of 'incremental build'), to install the sources into location from where the application will be run and prepare the application for deployment (eg. using maven to build the application etc..)

    • run

      This script is responsible for running a Spring Boot fat jar using java -jar. The image exposes port 8080, so it expects application to listen on port 8080 for incoming request.

    • save-artifacts

      In order to do an incremental build (iow. re-use the build artifacts from an already built image in a new image), this script is responsible for archiving those. In this image, this script will archive the /opt/java/.m2 directory.

Environment variables

  • APP_ROOT (default: '.')

    This variable specifies a relative location to your application inside the application GIT repository. In case your application is located in a sub-folder, you can set this variable to a ./myapplication.

  • APP_TARGET (default: 'target')

    This variable specifies a relative location to your application binary inside the container.

  • MVN_ARGS (default: '')

    This variable specifies the arguments for Maven inside the container.

Contributing

In order to test your changes to this STI image or to the STI scripts, you can use the test/run script. Before that, you have to build the 'candidate' image:

$ docker build -t codecentric/springboot-maven3-centos-candidate .

After that you can execute ./test/run. You can also use make test to automate this.

Copyright

Released under the Apache License 2.0. See the LICENSE file.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap