aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/nettest/Dockerfile
diff options
context:
space:
mode:
authorQiang Dai <Qiang.Dai@spirent.com>2018-02-23 15:54:05 +0800
committerzhihui wu <wu.zhihui1@zte.com.cn>2018-02-27 11:24:07 +0800
commit15ac21b3a3b72f8a1242e8a72cdec20ab4494186 (patch)
treefdb09de6e24e7dc450d686af391bfcd120d91077 /contrib/nettest/Dockerfile
parent66901a6c13ab1359161242a967f8d5b8d99ee4cb (diff)
support rfc2544 test using spirent virtual test center
1. support rfc2544 throughput and latency test with different packet size 2. support vswitch performance test based on STCv affinity deployment Change-Id: I597de973ab95039dcbcd2da8473a3a5c87a10c14 Signed-off-by: Qiang Dai <Qiang.Dai@spirent.com>
Diffstat (limited to 'contrib/nettest/Dockerfile')
-rw-r--r--contrib/nettest/Dockerfile47
1 files changed, 47 insertions, 0 deletions
diff --git a/contrib/nettest/Dockerfile b/contrib/nettest/Dockerfile
new file mode 100644
index 00000000..a0ecabf9
--- /dev/null
+++ b/contrib/nettest/Dockerfile
@@ -0,0 +1,47 @@
+##########################################################
+# Dockerfile to run a flask-based web application# Based on an ubuntu:16.04
+##########################################################
+
+# Set the base image to use to centos
+FROM ubuntu:16.04
+
+# Set the file maintainer
+MAINTAINER Qiang.Dai@spirent.com
+LABEL version="0.1" description="Spirent networking test Docker container"
+
+# Set env varibles used in this Dockerfile (add a unique prefix, such as DOCKYARD)
+# Local directory with project source
+ENV DOCKYARD_SRC=nettest \
+ DOCKYARD_SRCHOME=/opt \
+ DOCKYARD_SRCPROJ=/opt/nettest
+
+# Update the defualt application repository source list
+RUN apt-get update && apt-get install -y \
+ gcc \
+ python-dev \
+ python-pip \
+ python-setuptools \
+ --no-install-recommends \
+ && rm -rf /var/lib/apt/lists/*
+
+# Copy application source code to SRCDIR
+COPY $DOCKYARD_SRC $DOCKYARD_SRCPROJ
+
+# Create application subdirectories
+WORKDIR $DOCKYARD_SRCPROJ
+RUN mkdir -p log
+VOLUME ["$DOCKYARD_SRCPROJ/log/"]
+
+# Install Python dependencies
+RUN pip install -U pip \
+ && pip install -U setuptools \
+ && pip install -r $DOCKYARD_SRCPROJ/requirements.txt
+
+# Port to expose
+EXPOSE 5001
+
+# Copy entrypoint script into the image
+WORKDIR $DOCKYARD_SRCPROJ
+
+#CMD ["/bin/bash"]
+CMD ["/bin/bash", "start.sh"]