This is an example how to simply dockerize your application with minimal effort.
gradle distribution
Distribution task depends on dockerize
task and fatjar
task.
Directory ${buildDir}/distribution
contains all you need to create docker image.
cd build/distribution
docker build -t jersey/hello .
docker run -p 4001:4004 -d jersey/hello
curl localhost:4001/base/helloworld
...and here we go
Hello World!