From: Jason Gunthorpe <jgg@xxxxxxxxxxxx> Remove some unneeded packages and files from the container. The unpacked image size is reduced by about 120MB. Signed-off-by: Jason Gunthorpe <jgg@xxxxxxxxxxxx> --- buildlib/cbuild | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/buildlib/cbuild b/buildlib/cbuild index d6727f46669197..cc9c7e2999a9d2 100755 --- a/buildlib/cbuild +++ b/buildlib/cbuild @@ -200,7 +200,7 @@ class APTEnvironment(Environment): build_python = True; def get_docker_file(self,tmpdir): res = DockerFile(self.docker_parent); - res.lines.append("RUN apt-get update && apt-get install -y --no-install-recommends %s && apt-get clean && rm -rf /usr/share/doc/ /usr/lib/debug"%( + res.lines.append("RUN apt-get update && apt-get install -y --no-install-recommends %s && apt-get clean && rm -rf /usr/share/doc/ /usr/lib/debug /var/lib/apt/lists/"%( " ".join(sorted(self.pkgs)))); return res; @@ -429,19 +429,38 @@ class tumbleweed(ZypperEnvironment): # ------------------------------------------------------------------------- -class azure_pipelines(bionic): - pkgs = bionic.pkgs | { +class azure_pipelines(APTEnvironment): + docker_parent = "ubuntu:18.04" + pkgs = { "abi-compliance-checker", "abi-dumper", "ca-certificates", "clang-8", + "cmake", + "cython3", + "debhelper", + "dh-systemd", + "dpkg-dev", "fakeroot", "gcc-9", "git", "python2.7", + "libc6-dev", + "libnl-3-dev", + "libnl-route-3-dev", + "libsystemd-dev", + "libudev-dev", + "make", + "ninja-build", + "pandoc", + "pkg-config", + "python3-docutils", + "python3", + "python3-dev", + "python3-docutils", "python3-yaml", "sparse", - 'python-docutils', + "valgrind", } | { # 32 bit build support "libgcc-9-dev:i386", -- 2.22.0