From 554bf82b79cfc492dc7ec34d3cb290580b369dbb Mon Sep 17 00:00:00 2001 From: Shiv Nagarajan Date: Wed, 23 May 2018 19:34:00 -0400 Subject: [PATCH 1/2] make dockerfile more configurable --- mcrouter/scripts/docker/Dockerfile | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/mcrouter/scripts/docker/Dockerfile b/mcrouter/scripts/docker/Dockerfile index 036157a3d..3758f9123 100644 --- a/mcrouter/scripts/docker/Dockerfile +++ b/mcrouter/scripts/docker/Dockerfile @@ -1,4 +1,5 @@ -FROM ubuntu:14.04 +ARG UBUNTU_VERSION=14.04 +FROM ubuntu:${UBUNTU_VERSION} MAINTAINER mcrouter @@ -6,12 +7,16 @@ ENV MCROUTER_DIR /usr/local/mcrouter ENV MCROUTER_REPO https://github.com/facebook/mcrouter.git ENV DEBIAN_FRONTEND noninteractive -RUN apt-get update && apt-get install -y git && \ +ARG UBUNTU_VERSION +ARG RELEASE_REV=master +RUN apt-get update && apt-get install -y software-properties-common git sudo && \ + add-apt-repository ppa:george-edison55/cmake-3.x && \ mkdir -p $MCROUTER_DIR/repo && \ cd $MCROUTER_DIR/repo && git clone $MCROUTER_REPO && \ + cd $MCROUTER_DIR/repo/mcrouter && git checkout ${RELEASE_REV} && \ cd $MCROUTER_DIR/repo/mcrouter/mcrouter/scripts && \ - ./install_ubuntu_14.04.sh $MCROUTER_DIR && \ - ./clean_ubuntu_14.04.sh $MCROUTER_DIR && rm -rf $MCROUTER_DIR/repo && \ + ./install_ubuntu_${UBUNTU_VERSION}.sh $MCROUTER_DIR && \ + { ./clean_ubuntu_${UBUNTU_VERSION}.sh $MCROUTER_DIR || true ; } && rm -rf $MCROUTER_DIR/repo && \ ln -s $MCROUTER_DIR/install/bin/mcrouter /usr/local/bin/mcrouter ENV DEBIAN_FRONTEND newt From 956e37b99923eabf47f0a7a927809f0564c4bb75 Mon Sep 17 00:00:00 2001 From: Shiv Nagarajan Date: Thu, 24 May 2018 22:14:58 -0400 Subject: [PATCH 2/2] rebase, cmake is installed in imstall_ubuntu_1404 --- mcrouter/scripts/docker/Dockerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/mcrouter/scripts/docker/Dockerfile b/mcrouter/scripts/docker/Dockerfile index 3758f9123..e0a7c513a 100644 --- a/mcrouter/scripts/docker/Dockerfile +++ b/mcrouter/scripts/docker/Dockerfile @@ -10,7 +10,6 @@ ENV DEBIAN_FRONTEND noninteractive ARG UBUNTU_VERSION ARG RELEASE_REV=master RUN apt-get update && apt-get install -y software-properties-common git sudo && \ - add-apt-repository ppa:george-edison55/cmake-3.x && \ mkdir -p $MCROUTER_DIR/repo && \ cd $MCROUTER_DIR/repo && git clone $MCROUTER_REPO && \ cd $MCROUTER_DIR/repo/mcrouter && git checkout ${RELEASE_REV} && \