-
-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #349 from bhadreshdesai/add-devcontainer
Add devcontainer
- Loading branch information
Showing
2 changed files
with
52 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.209.6/containers/java/.devcontainer/base.Dockerfile | ||
|
||
# [Choice] Java version (use -bullseye variants on local arm64/Apple Silicon): 11, 17, 11-bullseye, 17-bullseye, 11-buster, 17-buster | ||
ARG VARIANT="17-bullseye" | ||
FROM mcr.microsoft.com/vscode/devcontainers/java:0-${VARIANT} | ||
|
||
# [Choice] Node.js version: none, lts/*, defaults to generator-jhipster-quarkus default node version. | ||
ARG NODE_VERSION="20.12.2" | ||
|
||
RUN su -p vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install $NODE_VERSION 2>&1"; | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at: | ||
// https://github.com/microsoft/vscode-dev-containers/tree/v0.209.6/containers/java | ||
{ | ||
"name": "generator-jhipster-quarkus", | ||
"build": { | ||
"dockerfile": "Dockerfile", | ||
"context": "..", | ||
"args": { | ||
// Update the VARIANT arg to pick a Java version: 11, 17 | ||
// Append -bullseye or -buster to pin to an OS version. | ||
// Use the -bullseye variants on local arm64/Apple Silicon. | ||
"VARIANT": "17-bullseye", | ||
"NODE_VERSION": "20.12.2" | ||
} | ||
}, | ||
"mounts": [ | ||
// If your system OS/Architecture doesn't matches the container one, you can uncomment the following line and create node_modules_container to keep local and containers node_module usable. | ||
// "source=${localWorkspaceFolder}/node_modules_container,target=/workspaces/generator-jhipster-quarkus/node_modules,type=bind,consistency=cached", | ||
// "source=${localWorkspaceFolder}/../jhipster-samples,target=/workspaces/jhipster-samples,type=bind,consistency=cached" | ||
], | ||
"customizations": { | ||
"vscode": { | ||
// Set *default* container specific settings.json values on container create. | ||
"settings": { | ||
"java.jdt.ls.java.home": "/docker-java-home" | ||
}, | ||
// Add the IDs of extensions you want installed when the container is created. | ||
"extensions": ["eamodio.gitlens", "esbenp.prettier-vscode", "vitest.explorer"] | ||
} | ||
}, | ||
// Features to add to the dev container. More info: https://containers.dev/features. | ||
// "features": {}, | ||
// Use 'forwardPorts' to make a list of ports inside the container available locally. | ||
// "forwardPorts": [], | ||
// Uncomment the next line to run commands after the container is created. | ||
"postCreateCommand": "npm ci", | ||
// Configure tool-specific properties. | ||
// "customizations": {}, | ||
// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root. | ||
"remoteUser": "vscode" | ||
} |