Public | Automated Build

Last pushed: a year ago
Short Description
How to bootstrap a command line tool with Spring-Boot
Full Description


How to bootstrap a command line tool with Spring-Boot

Visit us at GitHub Pages and Docker Hub

Available tags

tag Description
Vanilla The POC release runs an empty context, used for bootstrapping, pretty much does nothing else

Fast-lane Start with Docker

docker pull dreamcaster/spring-boot-demo-cmdline:Vanilla

docker run dreamcaster/spring-boot-demo-cmdline:Vanilla

Implementation Details

Building from source

  • build the distribution assembly
mvn.cmd clean package

This Maven target will create a binary assembly ZIP at src/docker/assets/dist.

assembly configuration

Configuration for the assembly is found at src/assembly/cli-assembly.xml

Binary assembly ZIP may also include assets placed under src/main/resources: sample files, folder structures, and execution scripts.

configuration of target JAR

The start.class is defined at pom.xml



An executable uber-JAR demo-cmdline.jar is created at the target folder.

The uber-JAR contains all dependencies, which is usually a good choice for a distribution.


As usual for Spring-Boot, the MOTD may be configured on src/resources/banner.txt


slow lane

docker-compose -f app.yml up --build

To remove all exited containers

docker rm $(docker ps -a -f status=exited -q)

To remove all images

docker rm $(docker ps -a -f status=exited -q)


The main Dockerfile is placed under src/main/docker

Binary distributions is unzipped, ~/BIN_PACKAGE_PREFIX/bin/ gets executed, then sleeps.

The sleep comes in handy for debugging: otherwise the container would only execute, exiting immediately

While sleeping, you may inspect the container:

$ docker ps -a

$docker exec -it demo_cmdline bin/sh

GitHub Pages

bash ./

Sourced from the project README.MD of on branch gh-pages

Update on master, then replace the gh-branch

$ git push origin --delete gh-pages

$ git branch -D gh-pages

$ git init

$ git branch gh-pages

$ git push origin gh-pages

$ git branch

Git Tagging

Tags are synchronized on DockerHub as well.

add a Tag

$git tag -a Vanilla -m "just a POC for automated builds"

$git tag

$git git push origin Vanilla

remove a Tag

$ git tag                                                                    

$ git tag -d Vanilla                                                         
Deleted tag 'Vanilla' (was 3154b85)                                          

$ git push origin :refs/tags/Vanilla                                         
 - [deleted]         Vanilla                                                 

$ git tag                                                                    


Docker Cheat Sheet

Docker Pull Command