From b0c7d3cb09f1b95b926560cee67cc00e2fdcdf6f Mon Sep 17 00:00:00 2001 From: Boris Date: Mon, 9 Dec 2024 04:04:22 +0000 Subject: [PATCH] DockerSetup --- PRA04_ANSWER/app3.dockerfile | 14 ++++++++++++++ PRA04_ANSWER/book.dockerfile | 9 +++++++++ PRA04_ANSWER/index.qmd | 6 ++++++ 3 files changed, 29 insertions(+) create mode 100644 PRA04_ANSWER/app3.dockerfile create mode 100644 PRA04_ANSWER/book.dockerfile create mode 100644 PRA04_ANSWER/index.qmd diff --git a/PRA04_ANSWER/app3.dockerfile b/PRA04_ANSWER/app3.dockerfile new file mode 100644 index 00000000..b375e7d7 --- /dev/null +++ b/PRA04_ANSWER/app3.dockerfile @@ -0,0 +1,14 @@ +# Use an official lightweight Nginx image +FROM nginx:alpine + +# Set the working directory to /usr/share/nginx/html +WORKDIR /usr/share/nginx/html + +# Copy the static files from the dist directory to the container +COPY dist /usr/share/nginx/html + +# Expose port 80 for the web server +EXPOSE 80 + +# Command to run when the container starts +CMD ["nginx", "-g", "daemon off;"] diff --git a/PRA04_ANSWER/book.dockerfile b/PRA04_ANSWER/book.dockerfile new file mode 100644 index 00000000..9f7044fa --- /dev/null +++ b/PRA04_ANSWER/book.dockerfile @@ -0,0 +1,9 @@ +FROM openjdk:21-slim + +WORKDIR /app + +COPY BooksPageable-0.0.1-SNAPSHOT.jar app.jar + +EXPOSE 8088 + +CMD ["java", "-jar", "app.jar", "--server.port=8088"] diff --git a/PRA04_ANSWER/index.qmd b/PRA04_ANSWER/index.qmd new file mode 100644 index 00000000..759fde7c --- /dev/null +++ b/PRA04_ANSWER/index.qmd @@ -0,0 +1,6 @@ +--- +title: "Configuración y contenedorización de Docker para aplicaciones Spring Boot y React" + +author: "Boris" +--- +[Docker](https://borizsam.github.io/Proyecto-Dev/docker.html) \ No newline at end of file