You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2020/10/12 14:12:23 UTC

[GitHub] [druid] tdt17 opened a new pull request #10506: Reduce docker image size by half

tdt17 opened a new pull request #10506:
URL: https://github.com/apache/druid/pull/10506


   Fixes all distribution files are committed twice in docker image.
   
   ### Description
   
   Currently the build dist is copied in a first step and in a second step the owner is set to druid:druid.
   This leads to two times the image size (https://hub.docker.com/layers/apache/druid/0.20.0-rc2/images/sha256-75f14a2bbf00950d4da9d2e9d566fab07f62453524ec77d7e479fced48bf69ae?context=explore)
   
   The change does first create the user and set the owner of the build dist directly on copy.
   /druid.sh keeps the same.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


[GitHub] [druid] tdt17 commented on pull request #10506: Reduce docker image size by half

Posted by GitBox <gi...@apache.org>.
tdt17 commented on pull request #10506:
URL: https://github.com/apache/druid/pull/10506#issuecomment-711076256


   @suneet-s the total 900mb of the docker image are manly produced by two docker commands and their produced layers. The second layer is produced by exact the same data, but with different rights (by chown -R druid:druid /opt).
   @gianm Thanks for pointing that.
   Smaller images are good for faster startup in environments that need to download/upload the image.
   <img width="505" src="https://user-images.githubusercontent.com/2719698/96352717-bec33d00-10c5-11eb-90b7-471eaa359639.png">
   I don't have an automated test and i don't know your testing for your Dockerfile either, but i use this changes for an own docker image (based on the changes i did) in our environment (tested and in production). 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


[GitHub] [druid] gianm merged pull request #10506: Reduce docker image size by half

Posted by GitBox <gi...@apache.org>.
gianm merged pull request #10506:
URL: https://github.com/apache/druid/pull/10506


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


[GitHub] [druid] gianm commented on pull request #10506: Reduce docker image size by half

Posted by GitBox <gi...@apache.org>.
gianm commented on pull request #10506:
URL: https://github.com/apache/druid/pull/10506#issuecomment-708989120


   > @tdt17 can you explain what I'm supposed to be seeing in the docker hub link. I'm not very familiar with this. Thanks!
   
   I think the issue is that the `chown -R druid:druid /opt` line modifies the entire /opt directory, which is large, so the `/bin/sh -c addgroup -S -g` layer in that link is really big. (Docker stores images as a series of layers that are sort of like diffs from the previous layer.) By doing the chown inline with the copy, we eliminate that extra layer.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


[GitHub] [druid] suneet-s commented on pull request #10506: Reduce docker image size by half

Posted by GitBox <gi...@apache.org>.
suneet-s commented on pull request #10506:
URL: https://github.com/apache/druid/pull/10506#issuecomment-712166503


   Thanks for the explanation @tdt17


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


[GitHub] [druid] suneet-s commented on pull request #10506: Reduce docker image size by half

Posted by GitBox <gi...@apache.org>.
suneet-s commented on pull request #10506:
URL: https://github.com/apache/druid/pull/10506#issuecomment-708521259


   @tdt17 can you explain what I'm supposed to be seeing in the docker hub link. I'm not very familiar with this. Thanks!


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org