Open leftyb opened 8 years ago
http://thenewstack.io/microcontainers-iron-ios-new-hack-shrink-docker-containers/ I think it's worth investigating at some point indeed our docker image is too monolithic ideally we should layer it better create one for SIP Servlets that's layered on top of JBoss one and create the REstComm one layered on top of SIP Servlets when we think of it true, but I wonder at what cost all this comes... we don't need to download the whole zip everytime we just need to upgrade the war files and a couple of conf files which is much less than 300 MB every time
Breakdown of our usage https://imagelayers.io/?images=mobicents%2Frestcomm:latest
Amazing application.
Thank you Jean.
hi @deruelle @leftyb i have split restcomm docker image to 2 images:
Container's update size ~ 270 MB
https://github.com/hamsterksu/restcomm-docker-v2/tree/master
i think it's possible to split it to 3 images
but in this case we need to move a lot of changes in restomm-sip-servlets like there - https://github.com/RestComm/Restcomm-Connect/blob/master/release/build.xml#L151 i'm not sure it's good idea
Another possible solution split it to 3 images
to build restcomm/restcomm-base:as7 we can download restcomm-connect AS7 and remove all wars from deployments
except sip-servlets
and webrtc
and mediaserver
so restcomm/restcomm
will bring restcomm
, olympus
, restcomm-management
, visual-designer
and mediaserer
apps only
Another possible solution split it to 5 images
sip-servlets
, webrtc
)restcomm
, restcomm-management
)mediaserver
)olympus
)and use docker compose to run restcomm
to use all in one
WDYT?
option 4 is here - https://github.com/hamsterksu/restcomm-docker-v2/tree/option_4
@hamsterksu nice !
Would you like to make a pull request so that @leftyb can review ?
@deruelle i have not tested solution #4 pretty well. it's just a concept. i want to know your opinion
@gvagenas @leftyb can you comment on that ?
Hi @hamsterksu,
Thank you for the suggestion. I will need to make some tests following this approach to confirm. I am not sure that this approach is changing the download size, as by default docker updates only the layers that have changed, when you update a container. So maybe at the first update after pulling the container will result in less downloadable data, but after that, for pulling just new container where RC version/build has only been changed maybe the data to download will be the same, with the way we are using it now. But I can not say 100% will try to make some tests and will update.
We need to provide a more "light weight" container for the community users and for our own better production experience. There are various technics to reduce the size of the container.
https://www.ctl.io/developers/blog/post/optimizing-docker-images/ http://www.developer.com/design/a-guide-to-docker-image-optimization.html http://blog.tutum.co/2014/10/22/how-to-optimize-your-dockerfile/