Install JDK 11 / 17 as a DEB package for auto-updates
Currently, the JDK is installed using the tar.gz package. This leaves users with an old version as soon as the dev container is older than 3 months, since new JDK updates are released quarterly.
Instead, the JDK may be installed using the Linux package manager (apt or apt-get). This way, the user can be notified by the Linux system of the presence of older packages as soon as a newer version is released, automatically.
To accomplish this, the Java devcontainers must change how the JDK is installed.
Dev container source files
- Java: https://github.com/devcontainers/images/blob/main/src/java/.devcontainer/Dockerfile
How to install JDK using Linux's apt
- JDK 11 and 17 (Microsoft Build of OpenJKD): https://learn.microsoft.com/en-us/java/openjdk/install#install-on-ubuntu
Hi 👋
This is an interesting feedback, thank you!
We currently publish the java images for debian OS (bullseye and buster). So installing it with linux package manager should be possible.
This leaves users with an old version as soon as the dev container is older than 3 months, since new JDK updates are released quarterly.
I agree, however, if users rebuild their dev container, then they should get the latest JDK (patch version) via the latest images release (we publish all the dev container images at least once every month).
Wondering, @brunoborges are you familiar with how soon the apt packages are updated after new JDK versions are released? I think it should be around same time as the packages are available in microsoft packages registry, however, would be nice to know.
Wondering, @brunoborges are you familiar with how soon the
aptpackages are updated after new JDK versions are released? I think it should be around same time as the packages are available in microsoft packages registry, however, would be nice to know.
The Microsoft Build of OpenJDK apt packages are only published through the Microsoft Packages registry.