Created
October 15, 2025 03:15
-
-
Save ngnam/37db4d4f50017dc258f5391087c4a8ab to your computer and use it in GitHub Desktop.
.devcontainer/devcontainer.json
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
Show hidden characters
| { | |
| "name": "Digital Bank Backend (Spring Boot 3, Java 17, SQLite)", | |
| // Dùng image chính thức của devcontainers có sẵn Java 17 + Gradle/Maven | |
| "image": "mcr.microsoft.com/devcontainers/java:17", | |
| // Thư mục làm việc trong container | |
| "workspaceFolder": "/workspace", | |
| // Mount source code vào container | |
| "mounts": [ | |
| "source=.,target=/workspace,type=bind,consistency=cached", | |
| "source=gradle-cache,target=/home/vscode/.gradle,type=volume" | |
| ], | |
| // Forward port 8080 để test Spring Boot app | |
| "forwardPorts": [8080], | |
| // Cài thêm extensions hữu ích cho Java + Spring Boot | |
| "customizations": { | |
| "vscode": { | |
| "extensions": [ | |
| "vscjava.vscode-java-pack", | |
| "vscjava.vscode-spring-boot-dashboard", | |
| "vscjava.vscode-spring-initializr", | |
| "pivotal.vscode-spring-boot", | |
| "redhat.vscode-yaml", | |
| "esbenp.prettier-vscode" | |
| ] | |
| } | |
| }, | |
| // Chạy sau khi container tạo xong | |
| "postCreateCommand": "chmod +x ./gradlew || true && ./gradlew build -x test", | |
| // User mặc định | |
| "remoteUser": "vscode" | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment