LokeshBachu / JavaApp-Docker

Run a JavaApp as a docker container.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

JavaApp-Docker

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.

Dependencies

  1. Dockerfile (Containes the dependencies required for the app to run, e.g., Java 8)
  2. Jar file (HelloWorld.jar)

Running locally

  1. docker build command is used to create the container image and to install dependencies indicated in the docker file.

image

  1. Run the docker container. The container has the jar file that would be run.

FirstDockerAppDeployed

Running from dockerhub

  1. 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.

image

About

Run a JavaApp as a docker container.


Languages

Language:Dockerfile 100.0%