diff --git a/mcrouter/scripts/docker/Dockerfile b/mcrouter/scripts/docker/Dockerfile index 036157a3d..e0a7c513a 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,15 @@ 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 && \ 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