JDK-8272398 : Update DockerTestUtils.buildJdkDockerImage()
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 17,18
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2021-08-12
  • Updated: 2024-02-14
  • Resolved: 2021-08-17
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11 JDK 17 JDK 18 JDK 8
11.0.17Fixed 17.0.3-oracleFixed 18 b11Fixed 8u381Fixed
Related Reports
Blocks :  
Description
This work originated while working on JDK-8195809 "[TESTBUG] jps and jcmd -l support for containers is not tested".
The initial intent was to extend the buildJdkDockerImage() API of DockerTestUtils to accept custom Dockerfile content.
As I analyzed the usage of buildJdkDockerImage() I realized that:
  - 2nd argument "dockerfile" is always the same: "Dockerfile-BasicTest"
      its use has been obsolete for some time, in favor of Dockerfile generated by DockerTestUtils
  - 3rd argument "buildDirName" is also always the same: "jdk-docker"

Hence I thought it would be a good idea to simplify this API and make it up-to-date.

Also, since the method signature is being updated, I thought it would be a good idea to also change the name to use more generic container terminology:
buildJdkDockerImage() --> buildJdkContainerImage()

Comments
Fix Request (11u) I would like to have the patch in 11u as well, because the issue is present there too. The patch needs adjustment because of 2 missing files that are present in higher releases. Backport seems to be low risk. PR : https://github.com/openjdk/jdk11u-dev/pull/1156
15-06-2022

A pull request was submitted for review. URL: https://git.openjdk.org/jdk11u-dev/pull/1156 Date: 2022-06-15 11:51:16 +0000
15-06-2022

A pull request was submitted for review. URL: https://git.openjdk.java.net/jdk17u-dev/pull/71 Date: 2022-01-10 11:28:33 +0000
10-01-2022

Fix Request (17u) I would like to have the patch in 17u as well, because the issue is present there too. The patch applies cleanly.
07-01-2022

Changeset: ec63957f Author: Mikhailo Seledtsov <mseledtsov@openjdk.org> Date: 2021-08-17 23:22:44 +0000 URL: https://git.openjdk.java.net/jdk/commit/ec63957f9d103e86d3b8e235e79cabb8992cb3ca
17-08-2021

Testing: - ran jdk/containers and hotspot/containers tests on - OL 7.9 with Docker - OL 8.3 with Podman - OL 8.3 aarch64 with Podman All PASS
16-08-2021