Skip to content

Commit

Permalink
Add Dev Container configuration (#271)
Browse files Browse the repository at this point in the history
* Add Dev Container configuration

* Remove the postCreateCommand

* Add configuration tips for VS Code in Dev Container
  • Loading branch information
arey authored Aug 2, 2024
1 parent d7805f3 commit 5c75862
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"name": "Spring Petclinic Microservices",
// Java Development Container Images https://mcr.microsoft.com/en-us/product/devcontainers/java/tags
"image": "mcr.microsoft.com/devcontainers/java:17-bullseye",
// Features list https://containers.dev/features
"features": {
"ghcr.io/devcontainers/features/java:1": {
"installMaven": "true",
"installGradle": "false"
},
"ghcr.io/devcontainers/features/azure-cli:1":{}, // Install Azure CLI
"ghcr.io/devcontainers/features/docker-in-docker:2":{}, // install docker
},
"customizations": {
// Configure properties specific to VScode
"vscode": {
"settings": {
// VSCode settings https://github.com/redhat-developer/vscode-java/blob/master/README.md
"java.server.launchMode": "Standard"
},
"extensions":[
"vscjava.vscode-java-pack",
"vscjava.vscode-maven",
"github.vscode-github-actions",
"github.vscode-pull-request-github",
"redhat.vscode-xml",
"vmware.vscode-boot-dev-pack",
"mhutchie.git-graph"
]
},
},
"forwardPorts": [8080, 8888, 8761]
}
2 changes: 2 additions & 0 deletions spring-petclinic-api-gateway/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,8 @@
<version>${wro4j.version}</version>
<executions>
<execution>
<!-- Configuration tips for VS Code in Dev Container -->
<?m2e execute onConfiguration?>
<phase>generate-resources</phase>
<goals>
<goal>run</goal>
Expand Down

0 comments on commit 5c75862

Please sign in to comment.