bpkroth commented on code in PR #13034:
URL: https://github.com/apache/iceberg/pull/13034#discussion_r2085326688


##########
.devcontainer/devcontainer.json:
##########
@@ -0,0 +1,54 @@
+// For format details, see https://aka.ms/devcontainer.json. For config 
options, see the
+// README at: https://github.com/devcontainers/templates/tree/main/src/java
+{
+    "name": "Java",
+    // Or use a Dockerfile or Docker Compose file. More info: 
https://containers.dev/guide/dockerfile
+    "image": "mcr.microsoft.com/devcontainers/java:1-21-bullseye",
+    "initializeCommand": {
+               // Make sure the .gradle directory exists on the host so we can 
bind to it.
+        // TODO: Make this work on Windows too.
+        "create-gradle-cachedir": "mkdir -pv ${localEnv:HOME}/.gradle"
+    },
+
+    "mounts": [
+               // Bind mount the .gradle directory to the host so we can reuse 
the cache across containers.
+        
"source=${localEnv:USERPROFILE}${localEnv:HOME}/.gradle,target=/home/vscode/.gradle,type=bind"
+    ],
+
+    "containerEnv": {
+        // Set the JAVA_HOME environment variable to use the Java installation 
in the devcontainer.
+        "JAVA_HOME": "/usr/lib/jvm/msopenjdk-current/",
+        // Set the PATH environment variable to include the Java installation 
in the devcontainer.
+        "PATH": "/usr/lib/jvm/msopenjdk-current/bin:${containerEnv:PATH}"
+    },
+
+    "features": {
+        "ghcr.io/devcontainers/features/java:1": {
+            "version": "none",
+            "installMaven": "false",
+            "installGradle": "true"
+        },
+        "ghcr.io/stuartleeks/dev-container-features/shell-history:0": {}
+    },
+    "customizations": {
+        "vscode": {
+            "extensions": [
+                "vscjava.vscode-java-pack",
+                "Github.copilot",
+                "GitHub.copilot-chat"

Review Comment:
   Not strictly required to list here, but part of the reason we were looking 
at enabling the devcontainer in the first place.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to