update devcontainer

This commit is contained in:
2025-06-06 20:39:19 +02:00
parent 7481d1ab63
commit 613b8c6e34
2 changed files with 19 additions and 1 deletions

View File

@@ -0,0 +1,16 @@
FROM mcr.microsoft.com/openjdk/jdk:21-ubuntu
# Set build arguments for username, UID, and GID
ARG USERNAME=java
ARG USER_UID=1000
ARG USER_GID=1000
# Create the user and group with the specified UID and GID
RUN groupadd --gid $USER_GID $USERNAME \
&& useradd --uid $USER_UID --gid $USER_GID -m $USERNAME
# Set the default user
USER $USERNAME
# Set the working directory
WORKDIR /home/$USERNAME

View File

@@ -1,6 +1,8 @@
{ {
"name": "OpenJDK21", "name": "OpenJDK21",
"image": "mcr.microsoft.com/openjdk/jdk:21-ubuntu", "build": {
"dockerfile": "Dockerfile",
},
"features": { "features": {
"ghcr.io/devcontainers/features/java:1": { "ghcr.io/devcontainers/features/java:1": {
"installMaven": "true" "installMaven": "true"