Skip to content

Conversation

@brunoborges
Copy link
Member

@brunoborges brunoborges commented Dec 13, 2024

This pull request introduces Dockerfiles to create container images for the Microsoft Build of OpenJDK using Ubuntu Chisel, a lightweight and streamlined version of Ubuntu designed for smaller image sizes.

Key Features

1. Smaller Base Image:

  • The adoption of Ubuntu Chisel reduces the overall image size compared to traditional Ubuntu-based images, offering a more efficient alternative.

2. Default Configuration:

  • The container runs with root privileges by default and includes a bash shell.
  • The default entrypoint is set to the java command, allowing seamless execution of Java applications.

3. Optional Non-Shell User:

  • Users have the flexibility to configure the container to run with the app user, a non-privileged user that does not have access to a shell.

Rationale

This PR aims to provide an alternative that strikes a balance between minimalism and usability, catering to users who require a smaller Ubuntu-based image but still need access to a shell for debugging or other purposes.

$  docker git:(ubuntu-chiselled) ✗ docker images | grep ubuntu                                 
mcr.microsoft.com/openjdk/jdk    21-ubuntu-chisel      16a311bf8191   38 minutes ago      169MB
mcr.microsoft.com/openjdk/jdk    17-ubuntu-chisel      3948e6292841   38 minutes ago      156MB
mcr.microsoft.com/openjdk/jdk    11-ubuntu-chisel      220b15004ed8   38 minutes ago      156MB
mcr.microsoft.com/openjdk/jdk    21-ubuntu             aacd344997b6   13 hours ago        673MB
mcr.microsoft.com/openjdk/jdk    17-ubuntu             e5c6ef2ce7c4   13 hours ago        632MB
mcr.microsoft.com/openjdk/jdk    11-ubuntu             380ccaa60052   13 hours ago        613MB

@brunoborges brunoborges changed the title Initial draft of an Ubuntu Chiselled image for MS Build of OpenJDK Initial draft of Ubuntu Chisel images for MS Build of OpenJDK Dec 23, 2024
@brunoborges brunoborges marked this pull request as ready for review December 23, 2024 21:01
@brunoborges brunoborges changed the title Initial draft of Ubuntu Chisel images for MS Build of OpenJDK Ubuntu Chisel images for MS Build of OpenJDK (11, 17, 21) Dec 23, 2024
@brunoborges brunoborges requested a review from karianna December 24, 2024 20:03
@brunoborges brunoborges marked this pull request as draft March 27, 2025 19:12
@brunoborges
Copy link
Member Author

This needs more thought. Moving PR back to draft.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants