/simple-java-app-docker

Example of a simple Dockerized Java Application

Primary LanguageShell

Simple Docker Java Application

This is a sample application to show how to deploy and run Java apps with Docker.

Environment:

  • Java 8+
  • Docker

Building docker image and testing:

$ ./build-and-run.sh

If you're running the application directly:

$ java -jar app.jar

OR

$ java Main

It will just print "Hello from host ..." (or whatever you have in the environment variable LOCATION, to be more precise).

But when running from docker, you should see "Hello from docker ..."

That's all!

References:

What java.security.egd option is for?