apt-get clean & Co must be specified on each apt-get update/install run, otherwise you will not see any reduction. Once files are stored in a layer you will not get it away afterwards, somehow like git ;)
RUN apt-get update && \ apt-get install -y locales && \ sed -i -e "s/# $LOCALE.*/$LOCALE UTF-8/" /etc/locale.gen && \ dpkg-reconfigure --frontend=noninteractive locales && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* RUN apt-get update && \ apt-get -y install gawk ... lsb-release && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* This way you will save ~35MB... > -----Ursprüngliche Nachricht----- > Von: Jan Kiszka [mailto:jan.kis...@siemens.com] > Gesendet: Montag, 19. Juni 2017 18:37 > An: Wagner, Daniel (CT RDA ITP SES-DE) > Cc: kas-devel@googlegroups.com; Yuecel, Mustafa (RC-CH MO MM R&D 5 2) > Betreff: [PATCH] Docker: Remove libsdl and xterm > > From: Jan Kiszka <jan.kis...@siemens.com> > > These packages date back from the (pre-public) times when the list was also > used > for developer host setups. > > Suggested-by: Mustafa Yuecel <mustafa.yue...@siemens.com> > Signed-off-by: Jan Kiszka <jan.kis...@siemens.com> > --- > > Applies on top of the Debian switch, I didn't try Ubuntu anymore. > > Installed size reduction: ~130 MB > The (offlist) suggested apt-get clean & Co. didn't provide reductions. > Seems like something is doing this automatically. > > Dockerfile | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/Dockerfile b/Dockerfile > index c0153d3..43454b4 100644 > --- a/Dockerfile > +++ b/Dockerfile > @@ -10,9 +10,9 @@ RUN apt-get update && apt-get install -y locales && \ RUN > apt-get -y install gawk wget git-core diffstat unzip \ > texinfo gcc-multilib build-essential \ > chrpath socat cpio python python3 \ > - libsdl1.2-dev xterm tar bzip2 curl \ > - dosfstools mtools parted syslinux tree \ > - python3-pip bc python3-yaml lsb-release > + tar bzip2 curl dosfstools mtools parted \ > + syslinux tree python3-pip bc python3-yaml \ > + lsb-release > RUN wget -nv -O /usr/bin/gosu > "https://github.com/tianon/gosu/releases/download/1.10/gosu-amd64" && \ > chmod +x /usr/bin/gosu > COPY . /kas > -- > 2.12.3 -- You received this message because you are subscribed to the Google Groups "kas-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to kas-devel+unsubscr...@googlegroups.com. To post to this group, send email to kas-devel@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/kas-devel/09B1120EF8ECDD439AD4717890DF4F700D93EA7F%40DEFTHW99EJ0MSX.ww902.siemens.net. For more options, visit https://groups.google.com/d/optout.