Spring Boot - Maven 3 - CentOS Docker image
DEPRECATED Please use https://hub.docker.com/r/codecentric/springboot-maven3-centos/
This image is heavily inspired by the awesome openshift/sti-ruby,
TODO Publish Image to Docker Hub
This folder contains scripts that are run by S2I:
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..)
This script is responsible for running a Spring Boot fat jar using
The image exposes port 8080, so it expects application to listen on port
8080 for incoming request.
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
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.
In order to test your changes to this STI image or to the STI scripts, you can
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
Building the spring-boot-example Spring Boot application..
$ s2i build git://github.com/codecentric/spring-boot-example codecentric/springboot-maven3-centos spring-boot-app $ docker run -p 8080:8080 spring-boot-app
Accessing the application:
$ curl 127.0.0.1:8080
Released under the Apache License 2.0. See the LICENSE file.