Docker Java 8 Helloworld
Example Docker image that when echos "Hello world!" when run.
Source: https://github.com/stevenalexander/docker-java8-helloworld
Image has JRE rather than JDK to limit installed components. Tested on Mac using Boot2Docker(v1.5.0).
Requires:
- Docker
- Boot2Docker
- JDK (to compile java file locally)
To run:
# compile class
javac helloworld.java
# build image
docker build -t java8-helloworld .
# run image
docker run -it --rm --name my-running-app java8-helloworld