ultima version del docker y launch y tasks

This commit is contained in:
Jaime Jiménez
2025-06-13 13:38:13 +02:00
parent 06889201e5
commit 9236d8ccd1
5 changed files with 31 additions and 25 deletions

1
.dockerignore Normal file
View File

@ -0,0 +1 @@
target/

27
.vscode/launch.json vendored
View File

@ -1,17 +1,14 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "java",
"name": "Depurar Spring Boot en Docker",
"request": "attach",
"hostName": "localhost",
"port": 5005,
"preLaunchTask": "Run Spring Boot in Docker with Debug",
"postDebugTask": "Stop Spring Boot in Docker",
}
]
"version": "0.2.0",
"configurations": [
{
"type": "java",
"name": "Debug Spring Boot in Docker",
"request": "attach",
"hostName": "localhost",
"port": 5005,
"preLaunchTask": "Start Spring Boot in Docker (Debug)",
"postDebugTask": "Stop Spring Boot in Docker"
}
]
}

23
.vscode/tasks.json vendored
View File

@ -2,27 +2,30 @@
"version": "2.0.0",
"tasks": [
{
"label": "Run Spring Boot in Docker with Debug",
"label": "Start Spring Boot in Docker (Debug)",
"type": "process",
"command": "docker",
"args": [
"exec",
"-it",
"-i",
"springboot-dev",
"./mvnw",
"spring-boot:run",
"-Dspring-boot.run.jvmArguments=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005"
"sh",
"-c",
"./mvnw spring-boot:run -o -Dspring-boot.run.fork=false -Dmaven.resources.skip=true -Dmaven.test.skip=true -Dspring-boot.run.jvmArguments=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005"
],
"problemMatcher": [],
"group": {
"kind": "build",
"isDefault": true
"isBackground": true,
"problemMatcher": {
"background": {
"activeOnStart": true,
"beginsPattern": ".*",
"endsPattern": "Listening for transport dt_socket at address: 5005"
}
}
},
{
"label": "Stop Spring Boot in Docker",
"type": "shell",
"command": "docker exec springboot-dev pkill -f spring-boot:run",
"command": "docker exec springboot-dev pkill -f jdwp=transport",
"problemMatcher": []
}
]

View File

@ -23,6 +23,7 @@ services:
volumes:
- ./:/app
- ./m2:/root/.m2
- ./target:/app/target
ports:
- "8080:8080"
- "5005:5005"

View File

@ -68,8 +68,12 @@
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<addResources>false</addResources>
</configuration>
</plugin>
</plugins>
</build>
</project>