From 4ca43aeb04afbd839fda26874ed6b2acf0b2e854 Mon Sep 17 00:00:00 2001 From: Marko Viitanen Date: Wed, 9 Mar 2016 13:22:27 +0200 Subject: [PATCH] Moved required packages and apt-mark showauto output to env variables --- Dockerfile | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2491de76..1d8cd083 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,19 +1,14 @@ FROM ubuntu:15.10 + ENV REQUIRED_PACKAGES automake autoconf libtool m4 build-essential git yasm RUN apt-get update - RUN apt-get install -y \ - automake \ - autoconf \ - libtool \ - m4 \ - build-essential \ - git \ - yasm; \ + RUN apt-get install -y $REQUIRED_PACKAGES ; \ git clone --depth=1 git://github.com/ultravideo/kvazaar.git; \ cd kvazaar; \ ./autogen.sh; \ ./configure --disable-shared;\ make;\ - apt-get remove --purge -y automake autoconf libtool m4 build-essential git yasm `apt-mark showauto`; \ + AUTOINSTALLED_PACKAGES=`apt-mark showauto`;\ + apt-get remove --purge -y $REQUIRED_PACKAGES $AUTOINSTALLED_PACKAGES; \ apt-get autoremove -y; \ apt-get clean all; \ rm -rf /var/lib/apt/lists/*