Skip to content

Commit 554bf82

Browse files
committed
make dockerfile more configurable
1 parent e71d608 commit 554bf82

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

mcrouter/scripts/docker/Dockerfile

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,22 @@
1-
FROM ubuntu:14.04
1+
ARG UBUNTU_VERSION=14.04
2+
FROM ubuntu:${UBUNTU_VERSION}
23

34
MAINTAINER mcrouter <mcrouter@fb.com>
45

56
ENV MCROUTER_DIR /usr/local/mcrouter
67
ENV MCROUTER_REPO https://github.com/facebook/mcrouter.git
78
ENV DEBIAN_FRONTEND noninteractive
89

9-
RUN apt-get update && apt-get install -y git && \
10+
ARG UBUNTU_VERSION
11+
ARG RELEASE_REV=master
12+
RUN apt-get update && apt-get install -y software-properties-common git sudo && \
13+
add-apt-repository ppa:george-edison55/cmake-3.x && \
1014
mkdir -p $MCROUTER_DIR/repo && \
1115
cd $MCROUTER_DIR/repo && git clone $MCROUTER_REPO && \
16+
cd $MCROUTER_DIR/repo/mcrouter && git checkout ${RELEASE_REV} && \
1217
cd $MCROUTER_DIR/repo/mcrouter/mcrouter/scripts && \
13-
./install_ubuntu_14.04.sh $MCROUTER_DIR && \
14-
./clean_ubuntu_14.04.sh $MCROUTER_DIR && rm -rf $MCROUTER_DIR/repo && \
18+
./install_ubuntu_${UBUNTU_VERSION}.sh $MCROUTER_DIR && \
19+
{ ./clean_ubuntu_${UBUNTU_VERSION}.sh $MCROUTER_DIR || true ; } && rm -rf $MCROUTER_DIR/repo && \
1520
ln -s $MCROUTER_DIR/install/bin/mcrouter /usr/local/bin/mcrouter
1621

1722
ENV DEBIAN_FRONTEND newt

0 commit comments

Comments
 (0)