Skip to content

Commit 5c75862

Browse files
authored
Add Dev Container configuration (#271)
* Add Dev Container configuration * Remove the postCreateCommand * Add configuration tips for VS Code in Dev Container
1 parent d7805f3 commit 5c75862

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed

.devcontainer/devcontainer.json

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"name": "Spring Petclinic Microservices",
3+
// Java Development Container Images https://mcr.microsoft.com/en-us/product/devcontainers/java/tags
4+
"image": "mcr.microsoft.com/devcontainers/java:17-bullseye",
5+
// Features list https://containers.dev/features
6+
"features": {
7+
"ghcr.io/devcontainers/features/java:1": {
8+
"installMaven": "true",
9+
"installGradle": "false"
10+
},
11+
"ghcr.io/devcontainers/features/azure-cli:1":{}, // Install Azure CLI
12+
"ghcr.io/devcontainers/features/docker-in-docker:2":{}, // install docker
13+
},
14+
"customizations": {
15+
// Configure properties specific to VScode
16+
"vscode": {
17+
"settings": {
18+
// VSCode settings https://github.com/redhat-developer/vscode-java/blob/master/README.md
19+
"java.server.launchMode": "Standard"
20+
},
21+
"extensions":[
22+
"vscjava.vscode-java-pack",
23+
"vscjava.vscode-maven",
24+
"github.vscode-github-actions",
25+
"github.vscode-pull-request-github",
26+
"redhat.vscode-xml",
27+
"vmware.vscode-boot-dev-pack",
28+
"mhutchie.git-graph"
29+
]
30+
},
31+
},
32+
"forwardPorts": [8080, 8888, 8761]
33+
}

spring-petclinic-api-gateway/pom.xml

+2
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,8 @@
152152
<version>${wro4j.version}</version>
153153
<executions>
154154
<execution>
155+
<!-- Configuration tips for VS Code in Dev Container -->
156+
<?m2e execute onConfiguration?>
155157
<phase>generate-resources</phase>
156158
<goals>
157159
<goal>run</goal>

0 commit comments

Comments
 (0)