[PATCH] Docker: Remove libsdl and xterm

6 views
Skip to first unread message

Jan Kiszka

unread,
Jun 19, 2017, 12:37:26 PM6/19/17
to Daniel Wagner, kas-...@googlegroups.com, Yuecel, Mustafa
From: Jan Kiszka <jan.k...@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...@siemens.com>
Signed-off-by: Jan Kiszka <jan.k...@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

Yuecel, Mustafa

unread,
Jun 19, 2017, 4:01:33 PM6/19/17
to Kiszka, Jan, Wagner, Daniel, kas-...@googlegroups.com
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.k...@siemens.com]
> Gesendet: Montag, 19. Juni 2017 18:37
> An: Wagner, Daniel (CT RDA ITP SES-DE)
> Cc: kas-...@googlegroups.com; Yuecel, Mustafa (RC-CH MO MM R&D 5 2)
> Betreff: [PATCH] Docker: Remove libsdl and xterm

Jan Kiszka

unread,
Jun 20, 2017, 1:50:26 AM6/20/17
to Yuecel, Mustafa (RC-CH MO MM R&D 5 2), Wagner, Daniel (CT RDA ITP SES-DE), kas-...@googlegroups.com
On 2017-06-19 22:01, Yuecel, Mustafa (RC-CH MO MM R&D 5 2) wrote:
> 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 ;)

Good to know, indeed!

>
> 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...

I managed to save 12 MB by combining both steps and adding your cleanup
rules at the end. With separate steps like above, I only saved 10 MB.
Maybe you tried with Ubuntu or without the removal patch below?

Anyway, another cleanup patch on top will follow, thanks!

Jan
--
Siemens AG, Corporate Technology, CT RDA ITP SES-DE
Corporate Competence Center Embedded Linux

Yuecel, Mustafa

unread,
Jun 20, 2017, 9:00:00 AM6/20/17
to Kiszka, Jan, Wagner, Daniel, kas-...@googlegroups.com

> -----Ursprüngliche Nachricht-----
> Von: Jan Kiszka [mailto:jan.k...@siemens.com]
> Gesendet: Dienstag, 20. Juni 2017 07:50
> An: Yuecel, Mustafa (RC-CH MO MM R&D 5 2); Wagner, Daniel (CT RDA ITP SES-
> DE)
> Cc: kas-...@googlegroups.com
> Betreff: Re: [PATCH] Docker: Remove libsdl and xterm
>
> On 2017-06-19 22:01, Yuecel, Mustafa (RC-CH MO MM R&D 5 2) wrote:
> > 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 ;)
>
> Good to know, indeed!
>
> >
> > 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...
>
> I managed to save 12 MB by combining both steps and adding your cleanup rules
> at the end. With separate steps like above, I only saved 10 MB.
> Maybe you tried with Ubuntu or without the removal patch below?

I tried it on Ubuntu where more repositories seems to be available

Daniel Wagner

unread,
Jun 20, 2017, 9:57:33 AM6/20/17
to Jan Kiszka, kas-...@googlegroups.com, Yuecel, Mustafa
Patch applied.
Reply all
Reply to author
Forward
0 new messages