Skip to content

Commit e37a463

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 e37a463

File tree

2 files changed

+54
-0
lines changed

2 files changed

+54
-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

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

0 commit comments

Comments
 (0)