apt-get: always use --no-install-recommends and apt-get clean

this helps us to avoid installing unneeded packages and removes the
package cache from the images to keep them less bloated.
This commit is contained in:
Harald Welte 2017-08-27 09:53:26 +02:00
parent 2a9e6aaea5
commit 3c1dc34c91
11 changed files with 124 additions and 98 deletions

View File

@ -2,44 +2,47 @@ FROM debian:jessie
MAINTAINER Harald Welte <laforge@gnumonks.org>
RUN apt-get update && apt-get install -y \
autoconf \
autoconf-archive \
autogen \
automake \
bison \
build-essential \
cppcheck \
debhelper \
devscripts \
dh-autoreconf \
dh-systemd \
doxygen \
flex \
g++ \
gawk \
gcc \
git \
git-buildpackage \
libc-ares-dev \
libdbd-sqlite3 \
libdbi-dev \
libfftw3-dev \
libgps-dev \
libgsm1-dev \
libortp-dev \
libpcap-dev \
libpcsclite-dev \
libtalloc-dev \
libtool \
libreadline-dev \
libsctp-dev \
libsofia-sip-ua-glib-dev \
libsqlite3-dev \
libssl-dev \
libusb-dev \
libusb-1.0-0-dev \
make \
pkg-config \
sqlite3 \
wget
RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y --no-install-recommends \
autoconf \
autoconf-archive \
autogen \
automake \
bison \
build-essential \
cppcheck \
debhelper \
devscripts \
dh-autoreconf \
dh-systemd \
doxygen \
flex \
g++ \
gawk \
gcc \
git \
git-buildpackage \
libc-ares-dev \
libdbd-sqlite3 \
libdbi-dev \
libfftw3-dev \
libgps-dev \
libgsm1-dev \
libortp-dev \
libpcap-dev \
libpcsclite-dev \
libtalloc-dev \
libtool \
libreadline-dev \
libsctp-dev \
libsofia-sip-ua-glib-dev \
libsqlite3-dev \
libssl-dev \
libusb-dev \
libusb-1.0-0-dev \
make \
pkg-config \
sqlite3 \
wget && \
apt-get clean

View File

@ -3,7 +3,6 @@ FROM laforge/debian-jessie-build
MAINTAINER Harald Welte <laforge@gnumonks.org>
RUN dpkg --add-architecture i386 && \
apt-get upgrade -y && \
apt-get install -y --no-install-recommends \
asciidoc \
bc \
@ -28,6 +27,7 @@ RUN useradd --uid=1000 build && \
RUN pip install timeout_decorator
# first add this file to invalidate cache each time osmo-python-tests.git is updated
ADD http://git.osmocom.org/python/osmo-python-tests/patch /tmp/commit-osmo-python-tests
RUN git clone git://git.osmocom.org/python/osmo-python-tests && \
cd osmo-python-tests && \

View File

@ -8,17 +8,20 @@ RUN apt-key add /tmp/Release.key && \
rm /tmp/Release.key && \
echo "deb http://download.opensuse.org/repositories/network:/osmocom:/nightly/Debian_8.0/ ./" > /etc/apt/sources.list.d/osmocom-nightly.list
RUN apt-get update && apt-get install -y \
telnet \
osmocom-sgsn \
osmocom-nitb \
osmocom-ipaccess-utils \
osmocom-gbproxy \
osmocom-bsc \
osmocom-bsc-nat \
osmocom-bs11-utils \
openggsn \
osmo-bts-trx \
osmo-trx \
osmo-pcu \
osmo-sip-connector
RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y --no-install-recommends \
telnet \
osmocom-sgsn \
osmocom-nitb \
osmocom-ipaccess-utils \
osmocom-gbproxy \
osmocom-bsc \
osmocom-bsc-nat \
osmocom-bs11-utils \
openggsn \
osmo-bts-trx \
osmo-trx \
osmo-pcu \
osmo-sip-connector && \
apt-get clean

View File

@ -5,7 +5,12 @@ MAINTAINER Harald Welte <laforge@gnumonks.org>
RUN apt-get update && apt-get install -y \
eclipse-titan
RUN apt-get update && apt-get -y install build-essential git
RUN apt-get update && \
apt-get upgrade -y && \
apt-get -y install \
build-essential \
git && \
apt-get clean
ARG eclipsegit=https://github.com/eclipse
ARG eclipsegit2=git://git.eclipse.org/gitroot/titan

View File

@ -8,14 +8,16 @@ RUN apt-key add /tmp/Release.key && \
rm /tmp/Release.key && \
echo "deb http://download.opensuse.org/repositories/network:/osmocom:/nightly/Debian_8.0/ ./" > /etc/apt/sources.list.d/osmocom-nightly.list
RUN apt-get update && apt-get install -y \
telnet \
libosmocore-dev \
libosmo-abis-dev \
libosmo-netif-dev \
libosmo-sccp-dev \
libsmpp34-dev \
libgtp-dev
RUN apt-get update && \
apt-get install -y --no-install-recommends \
telnet \
libosmocore-dev \
libosmo-abis-dev \
libosmo-netif-dev \
libosmo-sccp-dev \
libsmpp34-dev \
libgtp-dev &&
apt-get clean
WORKDIR /tmp

View File

@ -8,9 +8,11 @@ RUN apt-key add /tmp/Release.key && \
rm /tmp/Release.key && \
echo "deb http://download.opensuse.org/repositories/network:/osmocom:/nightly/Debian_8.0/ ./" > /etc/apt/sources.list.d/osmocom-nightly.list
RUN apt-get update && apt-get install -y \
telnet \
libosmocore-dev
RUN apt-get update && \
apt-get install -y --no-install-recommends \
telnet \
libosmocore-dev &&
apt-get clean
WORKDIR /tmp

View File

@ -8,14 +8,16 @@ RUN apt-key add /tmp/Release.key && \
rm /tmp/Release.key && \
echo "deb http://download.opensuse.org/repositories/network:/osmocom:/nightly/Debian_8.0/ ./" > /etc/apt/sources.list.d/osmocom-nightly.list
RUN apt-get update && apt-get install -y \
telnet \
libosmocore-dev \
libosmo-abis-dev \
libosmo-netif-dev \
libosmo-sccp-dev \
libsmpp34-dev \
libgtp-dev
RUN apt-get update && \
apt-get install -y --no-install-recommends \
telnet \
libosmocore-dev \
libosmo-abis-dev \
libosmo-netif-dev \
libosmo-sccp-dev \
libsmpp34-dev \
libgtp-dev &&
apt-get clean
WORKDIR /tmp

View File

@ -8,14 +8,16 @@ RUN apt-key add /tmp/Release.key && \
rm /tmp/Release.key && \
echo "deb http://download.opensuse.org/repositories/network:/osmocom:/nightly/Debian_8.0/ ./" > /etc/apt/sources.list.d/osmocom-nightly.list
RUN apt-get update && apt-get install -y \
telnet \
libosmocore-dev \
libosmo-abis-dev \
libosmo-netif-dev \
libosmo-sccp-dev \
libsmpp34-dev \
libgtp-dev
RUN apt-get update && \
apt-get install -y --no-install-recommends \
telnet \
libosmocore-dev \
libosmo-abis-dev \
libosmo-netif-dev \
libosmo-sccp-dev \
libsmpp34-dev \
libgtp-dev &&
apt-get clean
WORKDIR /tmp

View File

@ -8,10 +8,12 @@ RUN apt-key add /tmp/Release.key && \
rm /tmp/Release.key && \
echo "deb http://download.opensuse.org/repositories/network:/osmocom:/nightly/Debian_8.0/ ./" > /etc/apt/sources.list.d/osmocom-nightly.list
RUN apt-get update && apt-get install -y \
telnet \
libosmocore-dev \
libosmo-netif-dev
RUN apt-get update && \
apt-get install -y --no-install-recommends \
telnet \
libosmocore-dev \
libosmo-netif-dev && \
apt-get clean
WORKDIR /tmp

View File

@ -8,14 +8,16 @@ RUN apt-key add /tmp/Release.key && \
rm /tmp/Release.key && \
echo "deb http://download.opensuse.org/repositories/network:/osmocom:/nightly/Debian_8.0/ ./" > /etc/apt/sources.list.d/osmocom-nightly.list
RUN apt-get update && apt-get install -y \
telnet \
libosmocore-dev \
libosmo-abis-dev \
libosmo-netif-dev \
libosmo-sccp-dev \
libsmpp34-dev \
libgtp-dev
RUN apt-get update && \
apt-get install -y --no-install-recommends \
telnet \
libosmocore-dev \
libosmo-abis-dev \
libosmo-netif-dev \
libosmo-sccp-dev \
libsmpp34-dev \
libgtp-dev && \
apt-get clean
WORKDIR /tmp

View File

@ -2,8 +2,11 @@ FROM laforge/debian-jessie-build
MAINTAINER Harald Welte <laforge@gnumonks.org>
RUN apt-get update && apt-get install -y \
bison flex
RUN apt-get update && \
apt-get install -y --no-install-recommends \
bison \
flex && \
apt-get clean
COPY *.patch /tmp/