update devcontainer
This commit is contained in:
16
.devcontainer/server/Dockerfile
Normal file
16
.devcontainer/server/Dockerfile
Normal 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
|
||||||
@@ -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"
|
||||||
|
|||||||
Reference in New Issue
Block a user