mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-12-27 10:57:28 +00:00
Add devcontainer and gitpod
Also works in codespaces.
This commit is contained in:
parent
0c1fa8e8e2
commit
abee85939f
5 changed files with 42 additions and 0 deletions
5
.devcontainer/Dockerfile
Normal file
5
.devcontainer/Dockerfile
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
ARG VARIANT=11-bullseye
|
||||
FROM mcr.microsoft.com/vscode/devcontainers/java:0-${VARIANT}
|
||||
|
||||
ARG NODE_VERSION="none"
|
||||
RUN if [ "${NODE_VERSION}" != "none" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi
|
||||
25
.devcontainer/devcontainer.json
Normal file
25
.devcontainer/devcontainer.json
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
{
|
||||
"name": "Petclinic",
|
||||
"dockerFile": "Dockerfile",
|
||||
|
||||
"customizations": {
|
||||
"vscode": {
|
||||
"extensions": [
|
||||
"vscjava.vscode-java-pack",
|
||||
"redhat.vscode-xml"
|
||||
]
|
||||
}
|
||||
},
|
||||
"runArgs": [
|
||||
"--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined",
|
||||
"--mount", "type=bind,source=${env:HOME}/.m2,target=/home/vscode/.m2",
|
||||
"--mount", "type=bind,source=${env:HOME}/.gradle,target=/home/vscode/.gradle"
|
||||
],
|
||||
|
||||
"initializeCommand": "mkdir -p ${env:HOME}/.m2 ${env:HOME}/.gradle",
|
||||
"onCreateCommand": "sudo chown vscode:vscode /home/vscode/.m2 /home/vscode/.gradle",
|
||||
"remoteUser": "vscode",
|
||||
"features": {
|
||||
"docker-in-docker": "latest"
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue