From ccd139e931984ecf0d1285ca50c3c77d8407bde3 Mon Sep 17 00:00:00 2001 From: Enrico Costanzi Date: Wed, 22 May 2024 22:18:44 +0200 Subject: [PATCH] add Dockerfile --- Dockerfile | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..c3a3d81 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,14 @@ +# Use a base image with Java 17 installed +FROM eclipse-temurin:17 + +# Set the working directory inside the container +WORKDIR /app + +# Copy the JAR file into the container +COPY target/twelve-factor-demo.jar my-app.jar + +# Expose the port your application listens on (if applicable) +EXPOSE 8080 + +# Set the command to run your application when the container starts +CMD ["java", "-jar", "my-app.jar"]