From a4fb0c30683d498ded5394e4450c2a05139f2fa7 Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Mon, 10 Sep 2018 17:02:53 +0200 Subject: [PATCH] apt-install.sh --- docker/apt-install.sh | 9 +++++++++ docker/servo-x86_64-linux/Dockerfile | 5 ++--- 2 files changed, 11 insertions(+), 3 deletions(-) create mode 100755 docker/apt-install.sh diff --git a/docker/apt-install.sh b/docker/apt-install.sh new file mode 100755 index 00000000000..fdf7f860eb7 --- /dev/null +++ b/docker/apt-install.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +apt-get update +apt-get install -y --no-install-recommends "$@" + +# Purge apt-get caches to minimize image size +apt-get auto-remove -y +apt-get clean -y +rm -rf /var/lib/apt/lists/ diff --git a/docker/servo-x86_64-linux/Dockerfile b/docker/servo-x86_64-linux/Dockerfile index a812446f1d7..01780e7f20e 100644 --- a/docker/servo-x86_64-linux/Dockerfile +++ b/docker/servo-x86_64-linux/Dockerfile @@ -1,14 +1,13 @@ FROM ubuntu:bionic-20180821 -RUN apt-get update && \ - apt-get install -y --no-install-recommends \ +ADD apt-install.sh /apt-install.sh +RUN /apt-install.sh \ git \ curl \ ca-certificates \ python2.7 \ g++ \ && \ - rm -rf /var/lib/apt/lists/* && \ curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain none -y ENV PATH="/root/.cargo/bin:${PATH}"