Skip to content

Commit 8aab25a

Browse files
committed
Dockerfile y dockerignore
1 parent 9e3a8bb commit 8aab25a

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

.dockerignore

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
Maven output
2+
target
3+
4+
# Git repo
5+
.git
6+
.gitignore
7+
8+
# Maven wrapper config
9+
.mvn
10+
mvnw
11+
mvnw.cmd
12+
13+
# IDE files (opcional, no afecta pero te ahorra basura)
14+
*.iml
15+
.idea
16+
.vscode

Dockerfile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
FROM maven:3.9.6-eclipse-temurin-21 AS build
2+
WORKDIR /app
3+
COPY pom.xml .
4+
COPY src ./src
5+
RUN mvn -B -DskipTests package
6+
7+
FROM eclipse-temurin:21-jre
8+
WORKDIR /app
9+
COPY --from=build /app/target/*.jar app.jar
10+
EXPOSE 8080
11+
ENTRYPOINT ["java","-jar","app.jar"]

0 commit comments

Comments
 (0)