gravitino
gravitino copied to clipboard
refactor(dev/docker/hive): shrink hive Docker image size by 500MB
What changes were proposed in this pull request?
Use multi-stage build to reduce hive image size from 2.27GB to 1.83GB.
I use first stage to download archive file and unzip them, then in the final stage, copied them to destination directory.
Why are the changes needed?
Fix: #3262
Does this PR introduce any user-facing change?
No.
How was this patch tested?
Unit tests.
TODO
- [ ] @xunliu needs to push new image release to docker hub
- [ ] @unknowntpo should update changelog
reopen for rerunning ci tests
@mchades Would you like to review this PR ?
I use soft-link approach as @zhoukangcn mentioned at https://github.com/datastrato/gravitino/pull/3268#discussion_r1593426981, because we don't need to maintain lots of env var like JAVA_HOME=/usr/local/jdk
at 1st stage and final stage, which is a little bit ugly.
c.c. @xunliu , @mchades
hi @unknowntpo thank you for your continue work. Please attach your latest Docker image size screen snapshot in the comments. Use soft link also shrink size by 500MB?
@xunliu Shrinked hive Docker image: 1.85 GB (with soft-link)
Original Docker image: 2.27 GB
It's not 500 MB, but 420 MB 😭
hi @unknowntpo Please fix branch conflicts. Thanks
@unknowntpo Could you also modify the change log? please see: https://github.com/datastrato/gravitino/blob/5a4931b1ce6e94e32003cffa17c8e955518039dd/docs/docker-image-details.md?plain=1#L103-L105
I have released gravitino-ci-hive:0.1.12. Please upgrade it to Gravitino from version 0.1.11 to 0.1.12.
I have released gravitino-ci-hive:0.1.12. Please upgrade it to Gravitino from version 0.1.11 to 0.1.12.
@yuqi1129 Done.
I have released gravitino-ci-hive:0.1.12. Please upgrade it to Gravitino from version 0.1.11 to 0.1.12.
@yuqi1129 Done.
I mean you need to change the following place:
There should be several similar places.
@yuqi1129 done, the tests has passed.