Run a JavaApp as a docker container.
The below instructions can be followed to deploy a java app on dockerhub, provided docker is already installed on the machine.
- Dockerfile (Containes the dependencies required for the app to run, e.g., Java 8)
- Jar file (HelloWorld.jar)
- docker build command is used to create the container image and to install dependencies indicated in the docker file.
- Run the docker container. The container has the jar file that would be run.
- Pull the container from dockerhub as it's available publically and run the container. The "HelloWorld.jar" app inside the container will be run and the result will be printed as "Hello World!" on the command prompt.