Created
April 1, 2025 01:55
-
-
Save andresavilesdev/9e4c678562a1b415bf4971820d9e85fc to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Imagen modelo | |
| FROM <image> -> eclipse-temurin:21.0.3_9-jdk | |
| # Definir directorio raiz de nuestro contenedor | |
| WORKDIR /root | |
| # Copiar y pegar archivos dentro del contenedor | |
| COPY ./pom.xml /root | |
| COPY ./.mvn /root/.mvn | |
| COPY ./mvnw /root | |
| # Descargar las dependencias | |
| RUN ./mvnw dependency:go-offline | |
| # Copiar codigo fuente dentro del contenedor | |
| COPY ./src /root/src | |
| # Construir nuestra aplicacion | |
| RUN ./mvnw clean install -DskipTests | |
| # Levantar nuestra app cuando el contenedor inicie | |
| ENTRYPOINT ["java","-jar","/root/target/<.jar>"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment