Return-Path: X-Original-To: apmail-stratos-dev-archive@minotaur.apache.org Delivered-To: apmail-stratos-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0F98B101BF for ; Fri, 26 Dec 2014 11:09:32 +0000 (UTC) Received: (qmail 81007 invoked by uid 500); 26 Dec 2014 11:09:31 -0000 Delivered-To: apmail-stratos-dev-archive@stratos.apache.org Received: (qmail 80954 invoked by uid 500); 26 Dec 2014 11:09:31 -0000 Mailing-List: contact dev-help@stratos.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@stratos.apache.org Delivered-To: mailing list dev@stratos.apache.org Received: (qmail 80943 invoked by uid 99); 26 Dec 2014 11:09:31 -0000 Received: from mail-relay.apache.org (HELO mail-relay.apache.org) (140.211.11.15) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 26 Dec 2014 11:09:31 +0000 Received: from mail-oi0-f42.google.com (mail-oi0-f42.google.com [209.85.218.42]) by mail-relay.apache.org (ASF Mail Server at mail-relay.apache.org) with ESMTPSA id DE1781A0155 for ; Fri, 26 Dec 2014 11:09:28 +0000 (UTC) Received: by mail-oi0-f42.google.com with SMTP id v63so22147160oia.1 for ; Fri, 26 Dec 2014 03:09:23 -0800 (PST) X-Received: by 10.202.210.82 with SMTP id j79mr23796611oig.131.1419592163118; Fri, 26 Dec 2014 03:09:23 -0800 (PST) MIME-Version: 1.0 Received: by 10.202.171.147 with HTTP; Fri, 26 Dec 2014 03:09:02 -0800 (PST) In-Reply-To: References: From: Imesh Gunaratne Date: Fri, 26 Dec 2014 16:39:02 +0530 Message-ID: Subject: Re: [Discuss] Docker base image size To: dev Content-Type: multipart/alternative; boundary=001a113d35ae9bd56b050b1c8ed9 --001a113d35ae9bd56b050b1c8ed9 Content-Type: text/plain; charset=UTF-8 Thanks Paul! We will have a look at it. As it looks like now a higher percentage of the space is taken for the dependent libraries. Thanks On Fri, Dec 26, 2014 at 3:57 PM, Paul Fremantle wrote: > I don't know if it works for Python, but there are some minimalistic > docker images for Java: e.g. > https://registry.hub.docker.com/u/errordeveloper/oracle-jre/dockerfile/ > > Paul > > On 25 December 2014 at 19:09, Imesh Gunaratne wrote: > >> Hi Devs, >> >> I did some analysis on the docker base image we have created and found >> that it's size is around 453.6 MB. >> >> This image has been created using Ubuntu 14.04 docker image, which is >> 192.7 MB, which means that we have added additional 260.9 MB by installing >> python cartridge agent and its dependencies. IMO we need to optimize this. >> >> We could use Debian 7.7 instead of Ubuntu 14.04 so that the parent image >> size would be 85.1 M and Stratos base image would be 369 M. This reduces >> nearly 84.6 MB from the Stratos base image. >> >> We could also check the dependencies we have added here [1], are we using >> all of them? >> >> RUN apt-get install -y git python python-pip python-dev gcc >> RUN pip install paho-mqtt >> RUN pip install GitPython==0.3.1-beta2 >> RUN pip install psutil >> RUN pip install gittle >> RUN pip install pexpect >> >> [1] https://github.com/chamilad/stratos-dockerfiles/tree/old-format >> >> Thanks >> >> -- >> Imesh Gunaratne >> >> Technical Lead, WSO2 >> Committer & PMC Member, Apache Stratos >> > > > > -- > Paul Fremantle > CTO and Co-Founder, WSO2 > OASIS WS-RX TC Co-chair, Apache Member > > UK: +44 207 096 0336 > > blog: http://pzf.fremantle.org > twitter.com/pzfreo > paul@wso2.com > > wso2.com Lean Enterprise Middleware > > Disclaimer: This communication may contain privileged or other > confidential information and is intended exclusively for the addressee/s. > If you are not the intended recipient/s, or believe that you may have > received this communication in error, please reply to the sender indicating > that fact and delete the copy you received and in addition, you should not > print, copy, retransmit, disseminate, or otherwise use the information > contained in this communication. Internet communications cannot be > guaranteed to be timely, secure, error or virus-free. The sender does not > accept liability for any errors or omissions. > -- Imesh Gunaratne Technical Lead, WSO2 Committer & PMC Member, Apache Stratos --001a113d35ae9bd56b050b1c8ed9 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Thanks Paul! We will have a look at it. As it looks like n= ow a higher percentage of the space is taken for the dependent libraries.
Thanks

On Fri, Dec 26, 2014 at 3:57 PM, Paul Fremantle <paul@wso2.= com> wrote:
I don't know if it works for Python, but there are some minimalistic = docker images for Java: e.g.=C2=A0https://regist= ry.hub.docker.com/u/errordeveloper/oracle-jre/dockerfile/

Paul
On 25 December 2014 at 19:09, Imesh Gunaratne <= span dir=3D"ltr"><= imesh@apache.org> wrote:
Hi Devs,

I did some analysis on the docke= r base image we have created and found that it's size is around 453.6 M= B.=C2=A0

This image has been created using Ubuntu = 14.04 docker image, which is 192.7 MB, which means that we have added addit= ional 260.9 MB by installing python cartridge agent and its dependencies. I= MO we need to optimize this.

We could use Debian 7= .7 instead of Ubuntu 14.04 so that the parent image size would be 85.1 M an= d Stratos base image would be 369 M. This reduces nearly 84.6 MB from the S= tratos base image.

We could also check the depende= ncies we have added here [1], are we using all of them?

RUN apt-get install -y git python python-pip python-dev gcc
RUN pip install paho-mqtt
RUN pip install GitPython=3D=3D0.= 3.1-beta2
RUN pip install psutil
RUN pip install gittle=
RUN pip install pexpect


Thanks

--
Imesh Gunaratne

Technical Lead, WSO2
Committer & PMC Member, A= pache Stratos



--
=
Paul Fremantle
CTO and Co-Founder, WSO2
OASIS W= S-RX TC Co-chair, Apache Member

UK: +44 207 096= 0336

blog: http://pzf.fremantle.org
twitter.com/pzfreo
paul@wso2.com

wso2.com Lean Enterprise Middleware

Di= sclaimer: This communication may contain privileged or other confidential i= nformation and is intended exclusively for the addressee/s. If you are not = the intended recipient/s, or believe that you may have received this commun= ication in error, please reply to the sender indicating that fact and delet= e the copy you received and in addition, you should not print, copy, retran= smit, disseminate, or otherwise use the information contained in this commu= nication. Internet communications cannot be guaranteed to be timely, secure= , error or virus-free. The sender does not accept liability for any errors = or omissions.



--
Imesh Gunaratne

Technical Lead, WSO2
Committer & PMC Member, A= pache Stratos
--001a113d35ae9bd56b050b1c8ed9--