Skip to content

Add DevContainer for Development Using VS Code #8

@MhouneyLH

Description

@MhouneyLH

As I personally don’t enjoy IntelliJ products that much, I prefer using VS Code for Java development.

Therefore, I created a devcontainer for myself. Currently, it only works on Linux, as the mount path needs to be adjusted depending on the operating system.

devcontainer.json:

{
  "build": {
    "dockerfile": "Dockerfile"
  },
  "name": "Hytale Modding Java 25 DevContainer",
  "workspaceFolder": "/workspaces",
  "customizations": {
    "vscode": {
      "extensions": ["vscjava.vscode-java-pack", "esbenp.prettier-vscode"]
    }
  },
  "features": {
    "ghcr.io/devcontainers/features/git:1": {}
  },
  "remoteUser": "root",
  "postCreateCommand": "apt-get update && apt-get install -y openssh-client && java -version && mvn -version",
  "mounts": [
    "source=/your-home-path/.var/app/com.hypixel.HytaleLauncher/data/Hytale/UserData,target=/hytale-userdata,type=bind,consistency=cached"
  ]
}

Dockerfile:

FROM eclipse-temurin:25-jdk

# Install Maven
RUN apt-get update \
    && apt-get install -y maven \
    && rm -rf /var/lib/apt/lists/*

WORKDIR /workspaces

Others also could benefit from this and save time setting up a new mod. :)

Additionally then based on this also some tasks like watching the server logs, copying the new mod in the dedicated directory etc. can be added. At least thats what I did for a faster development cycle.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions