Skip to content

jsingleton785/gitops-demo-webapp

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Building the Docker Image

Install Java 11

Run this command.

sudo apt install openjdk-11-jre-headless

Build the Application

Run:

./mvnw clean package

This will create the application file target/gitops-demo-webapp.jar.

Create the Docker Image

Log into Docker Hub.

docker login

Build the image. Here replace <DOCKER_USER> with your own Docker user ID.

docker build -t <DOCKER_USER>/gitops-demo-webapp .

Push the image.

docker push <DOCKER_USER>/gitops-demo-webapp

Test the Image

Run the image:

docker run --rm -p8080:8080 <DOCKER_USER>/gitops-demo-webapp

Send a request.

curl http://localhost:8080/hello

You should see.

{"requestCount":1,"greeting":"Hello!"}

Releases

No releases published

Packages

No packages published

Languages

  • Java 90.8%
  • Dockerfile 9.2%