diff --git a/App.java b/App.java new file mode 100644 index 0000000..efd20de --- /dev/null +++ b/App.java @@ -0,0 +1,5 @@ +public class App { + public static void main(String[] args) { + System.out.println("Hello from DevOps Docker Project!"); + } +} diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..8c9b1f2 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,5 @@ +FROM eclipse-temurin:17-jdk +WORKDIR /app +COPY . . +RUN javac App.java +CMD ["java", "App"] diff --git a/README.md b/README.md index 59e2167..d2dc1e9 100644 --- a/README.md +++ b/README.md @@ -1 +1,23 @@ +# Java Docker Application + +## Project Overview +This project demonstrates containerization of a simple Java application using Docker. + +## Technologies Used +- Java +- Docker +- Git +- GitHub + +## Steps Performed +1. Created simple Java application +2. Compiled Java file +3. Wrote Dockerfile +4. Built Docker image +5. Ran container +6. Pushed project to GitHub + +## Docker Commands Used +docker build -t java-docker-app . +docker run java-docker-app # testhttps diff --git a/test b/test new file mode 100644 index 0000000..6819fa1 --- /dev/null +++ b/test @@ -0,0 +1,3 @@ +#!/bin/bash +echo "hello" +