[
https://issues.apache.org/jira/browse/HDDS-13426?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18005055#comment-18005055
]
Attila Doroszlai edited comment on HDDS-13426 at 7/14/25 4:29 AM:
------------------------------------------------------------------
Thanks for the attachment. I guess it examined some ancient version of the
image, because most of the statements/suggestions are wrong. Contrary to what
it says, the docker image does not use {{openjdk}} as the base, and does use
multi-stage build.
Current images:
- {{ozone-runner}} includes software for running and testing Ozone
- {{ozone}} contains everything from the convenience binary tarball created for
each Ozone release, on top of {{ozone-runner}}
We may create slim variants, only keeping items necessary for running Ozone,
but not testing:
- {{ozone-runner}}: omit test tools, replace JDK with JRE
- {{ozone}}: omit docs, examples, fat jars, tests
was (Author: adoroszlai):
Thanks for the attachment. I guess it examined some ancient version of the
image, because most of the statements/suggestions are wrong. Contrary to what
it says, the docker image does not use {{openjdk}} as the base, and does use
multi-stage build.
- {{ozone-runner}} includes software for running and testing Ozone
- {{ozone}} contains everything from the convenience binary tarball created for
each Ozone release, on top of {{ozone-runner}}
We may create slim variants, only keeping items necessary for running Ozone,
but not testing:
- {{ozone-runner}}: omit test tools, replace JDK with JRE
- {{ozone}}: omit docs, examples, fat jars, tests
> Trim Ozone docker image size
> ----------------------------
>
> Key: HDDS-13426
> URL: https://issues.apache.org/jira/browse/HDDS-13426
> Project: Apache Ozone
> Issue Type: Task
> Components: docker
> Reporter: Wei-Chiu Chuang
> Priority: Major
> Attachments: Reduce Ozone docker image size.pdf
>
>
> Our official docker image size is a whopping 1.39GB
> ([https://hub.docker.com/layers/apache/ozone/2.0.0/images/sha256-366480e96ba738b05a5c893096f740d0b36f69d4608f96ae8d0adf896993e392])
> I asked ChatGPT for tips to reduce image size and it estimates a sizeable
> reduction in image size. Worth trying if someone's up for a test!
> [https://chatgpt.com/share/6871b841-46f8-800e-a335-3d1e356ac6b7]
> Also we have a few things we can remove from ozone tarball:
> {{{-}rw-r{-}{-}r{-}- 1 hadoop hadoop 71M Apr 4 08:45
> ozone-filesystem-hadoop2-2.0.0.jar
> {-}rw-r{-}{-}r{-}- 1 hadoop hadoop 71M Apr 4 08:45
> ozone-filesystem-hadoop3-2.0.0.jar
> {-}rw-r{-}{-}r{-}- 1 hadoop hadoop 71M Apr 4 09:11
> ozone-filesystem-hadoop3-client-2.0.0.jar}}
>
> We could probably also get rid of python, maven, install a minimal jdk, and
> use multi-stage to save more space.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]