Could you please share a sample showing how to doc...
# http4k
m
Could you please share a sample showing how to dockerify a http4k application?
d
we don't have one (and intentionally don't cover this type of thing in the docs) - but any standard Java main class which starts up an http4k app can be packaged in any standard format (eg. using the gradle application plugin), and then packaged into a Docker image as usual. There is also the option of using Google Jib to directly create docker images out of the gradle build process (it will also publish them), but once again there is other documentation on the web for that.
m
a
consider 2 things: a) if you will continually be updating the app, then every iteration involves creating a new docker image, uploading to a registry and replacing the running container. Can be a lot more work than simply replacing a JAR file and b) it's quite difficult to keep secrets (like db passwords) out of the docker image because the image must pass them on when starting the JAR. Now it's in your registry. Depending on who has access, this may not be secure. I dockerized everything EXCEPT the actual Java app, for these reasons. Just things to think about, may or may not work for you.