A Java devcontainer.
The 1.x version series is intended to use the following:
- Java 17
- Gradle 7.4
- Ubuntu "jammy"
- Docker outside of Docker (sibling container). Use a bind mount of the form
/var/run/docker.sock:/var/run/docker.sock
. We don't use Docker in Docker, because it appears to be the less good option.
- Grab project
git clone https://github.com/JeffersonLab/java-devcontainer
cd java-devcontainer
- Launch Compose
docker compose up
Add a .devcontainer directory to your project and launch it with Compose or your favorite devcontainer launcher (GitHub Codespaces, JetBrains Gateway, VSCode devcontainer extension).
Make changes to the Dockerfile, test them, then bump the version in the VERSION file and commit it. The CD GitHub Action should take care of the rest.