Skip to content

Commit

Permalink
Add simple devcontainer
Browse files Browse the repository at this point in the history
Adds a simple devcontainer template, which installs JDK 21 and Ant. Adds
dependencies to the devcontainer images in order to build JNA.

Signed-off-by: Sam Gammon <sam@elide.ventures>
  • Loading branch information
sgammon committed Jun 8, 2024
1 parent 4f94c57 commit 4f03daf
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM mcr.microsoft.com/devcontainers/java:1-21

RUN apt-get update \
&& apt-get upgrade -y \
&& apt-get install -y --no-install-recommends \
build-essential \
autoconf \
automake \
texinfo \
libtool \
libltdl-dev \
libx11-dev \
zsh \
curl \
wget \
&& echo "Image ready."
36 changes: 36 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"name": "JNA Development",
"build": {"dockerfile": "Dockerfile"},
"postAttachCommand": "ant clean && ant",
"features": {
"ghcr.io/devcontainers/features/java:1": {
"version": "none",
"installMaven": "true",
"mavenVersion": "3.8.6",
"installGradle": "false"
},
"ghcr.io/devcontainers-contrib/features/ant-sdkman:2": {}
},
"customizations": {
"vscode": {
"settings": {
"java.completion.enabled": true,
"java.debug.settings.enableRunDebugCodeLens": true,
"java.test.editor.enableShortcuts": true,
"terminal.integrated.customGlyphs": true,
"terminal.integrated.enableImages": true,
"terminal.integrated.gpuAcceleration": "on"
},
"extensions": [
"github.codespaces",
"oracle-labs-graalvm.graalvm",
"redhat.vscode-yaml",
"streetsidesoftware.code-spell-checker",
"asf.apache-netbeans-java",
"github.copilot",
"oracle-labs-graalvm.dashboard",
"oracle-labs-graalvm.graalvm-pack"
]
}
}
}

0 comments on commit 4f03daf

Please sign in to comment.