Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions consumer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Use an official OpenJDK image as a base
FROM eclipse-temurin:21-jre

# Set the working directory
WORKDIR /app

# Copy the built jar file into the container
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shall we Avoid relying on prebuilt JARs in here? Rather shall we go with some CI/CD friendly Approach? in other words lets handle the JAR build within the Dockerfile.

COPY target/consumer-0.0.1-SNAPSHOT.jar app.jar

# Expose the application port
EXPOSE 9229

# Run the application
ENTRYPOINT ["java", "-jar", "app.jar"]
14 changes: 14 additions & 0 deletions publisher/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Use an official OpenJDK image as a base
FROM eclipse-temurin:21-jre

# Set the working directory
WORKDIR /app

# Copy the built jar file into the container
COPY target/publisher-0.0.1-SNAPSHOT.jar app.jar

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's follow the same approach here as the consumer for the JAR scenario

# Expose the application port
EXPOSE 9219

# Run the application
ENTRYPOINT ["java", "-jar", "app.jar"]