Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make dockerfile more configurable #254

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions mcrouter/scripts/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
FROM ubuntu:14.04
ARG UBUNTU_VERSION=14.04
FROM ubuntu:${UBUNTU_VERSION}

MAINTAINER mcrouter <[email protected]>

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 && \
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

14.04 needs software-properties-common, and 16.04 needs 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 && \
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is no clean script for 16.04, but we can just try to call out to clean and accept and move on if it does not exist or fails.

ln -s $MCROUTER_DIR/install/bin/mcrouter /usr/local/bin/mcrouter

ENV DEBIAN_FRONTEND newt