Skip to content

Commit 4f03daf

Browse files
authored
Add simple devcontainer
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 <[email protected]>
1 parent 4f94c57 commit 4f03daf

File tree

2 files changed

+52
-0
lines changed

2 files changed

+52
-0
lines changed

.devcontainer/Dockerfile

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
FROM mcr.microsoft.com/devcontainers/java:1-21
2+
3+
RUN apt-get update \
4+
&& apt-get upgrade -y \
5+
&& apt-get install -y --no-install-recommends \
6+
build-essential \
7+
autoconf \
8+
automake \
9+
texinfo \
10+
libtool \
11+
libltdl-dev \
12+
libx11-dev \
13+
zsh \
14+
curl \
15+
wget \
16+
&& echo "Image ready."

.devcontainer/devcontainer.json

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"name": "JNA Development",
3+
"build": {"dockerfile": "Dockerfile"},
4+
"postAttachCommand": "ant clean && ant",
5+
"features": {
6+
"ghcr.io/devcontainers/features/java:1": {
7+
"version": "none",
8+
"installMaven": "true",
9+
"mavenVersion": "3.8.6",
10+
"installGradle": "false"
11+
},
12+
"ghcr.io/devcontainers-contrib/features/ant-sdkman:2": {}
13+
},
14+
"customizations": {
15+
"vscode": {
16+
"settings": {
17+
"java.completion.enabled": true,
18+
"java.debug.settings.enableRunDebugCodeLens": true,
19+
"java.test.editor.enableShortcuts": true,
20+
"terminal.integrated.customGlyphs": true,
21+
"terminal.integrated.enableImages": true,
22+
"terminal.integrated.gpuAcceleration": "on"
23+
},
24+
"extensions": [
25+
"github.codespaces",
26+
"oracle-labs-graalvm.graalvm",
27+
"redhat.vscode-yaml",
28+
"streetsidesoftware.code-spell-checker",
29+
"asf.apache-netbeans-java",
30+
"github.copilot",
31+
"oracle-labs-graalvm.dashboard",
32+
"oracle-labs-graalvm.graalvm-pack"
33+
]
34+
}
35+
}
36+
}

0 commit comments

Comments
 (0)