aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Feldt <hans.feldt@ericsson.com>2015-05-22 14:32:44 +0200
committerHans Feldt <hans.feldt@ericsson.com>2015-05-25 08:31:26 +0000
commitb2d8414cb1ba9700a88d629f6a3d1d88ca9dd92c (patch)
treefecac3fb7866dc071938215f572582ceab962ea5
parent5d8f20e7ee76ac56459bc7e37312ebc13fb7cf55 (diff)
add Dockerfile for yardstick
This allows running yardstick from a container not using a virtualenv. Example commands to build and run: docker build -t opnfv/yardstick . docker run -it --rm opnfv/yardstick Change-Id: Ia5a433c116d61e8d27e5ddb7186ef4b3ecd35e87 JIRA: - Signed-off-by: Hans Feldt <hans.feldt@ericsson.com>
-rw-r--r--Dockerfile40
1 files changed, 40 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 000000000..456626d44
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,40 @@
+FROM ubuntu:14.04
+MAINTAINER Hans Feldt <hans.feldt@ericsson.com>
+
+# TODO: Is there some easy way to get the fastest/closest mirror?
+#RUN sed -i 's/archive.ubuntu.com/ftp.acc.umu.se/g' /etc/apt/sources.list
+
+RUN apt-get update && apt-get install -y \
+ libffi-dev \
+ libssl-dev \
+ python \
+ python-dev \
+ python-setuptools && \
+ easy_install -U setuptools
+
+COPY . /tmp/yardstick
+
+RUN cd /tmp/yardstick && \
+ python setup.py install && \
+ apt-get -y remove \
+ binutils \
+ cpp \
+ gcc \
+ libffi-dev \
+ libssl-dev \
+ python3 \
+ python-dev && \
+ apt-get -y autoremove && \
+ apt-get clean && \
+ useradd -u 65500 -m yardstick && \
+ cp -a samples /home/yardstick && \
+ chown -R yardstick /home/yardstick/samples && \
+ chgrp -R yardstick /home/yardstick/samples && \
+ rm -rf /tmp/* && \
+ rm -rf /var/lib/apt/lists/*
+
+USER yardstick
+CMD bash --login
+ENV HOME /home/yardstick
+WORKDIR /home/yardstick
+