From b9e8931d0c8b8a8b02bf8d4365e9cdd1125de131 Mon Sep 17 00:00:00 2001 From: budi utomo Date: Fri, 30 Jun 2017 12:10:14 +0200 Subject: [PATCH 1/2] Copy only needed files inside docker image --- .dockerignore | 7 +++++++ .gitignore | 3 +++ Dockerfile | 3 ++- local.sh | 2 +- 4 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 .dockerignore diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..9cdbed1 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,7 @@ ++*/*.pyc + +# Coverage +.coverage +coverage.xml +xunit.xml +coverage/* diff --git a/.gitignore b/.gitignore index 351d89d..dfbb664 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,6 @@ coverage/* # Reports reports/* + +# Sample load test script +simple.py diff --git a/Dockerfile b/Dockerfile index e893833..899fe59 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,7 +22,8 @@ RUN pip install -r /tmp/requirements.txt #===================== # Start docker-locust #===================== -COPY . /opt/ +COPY src /opt/src/ +COPY setup.cfg /opt/ WORKDIR /opt ENV PYTHONPATH . CMD ["/usr/bin/python", "src/start.py"] diff --git a/local.sh b/local.sh index 7e968c4..417a18f 100755 --- a/local.sh +++ b/local.sh @@ -36,7 +36,7 @@ ________________________________________________________________________________ _________________________________________________________________________________ EOF - IMAGE="registry.opensource.zalan.do/tip/docker-locust:0.7.3-p0" + IMAGE="registry.opensource.zalan.do/tip/docker-locust:0.7.3-p1" echo "Used image: $IMAGE" echo "----------------------------------------------" From 7df0c59d8ee9158b21598e0d09c7d494d2c753dc Mon Sep 17 00:00:00 2001 From: budi utomo Date: Fri, 30 Jun 2017 12:35:27 +0200 Subject: [PATCH 2/2] Updated version of dependencies --- Dockerfile | 2 +- requirements.txt | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 899fe59..a7a522c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM registry.opensource.zalan.do/stups/ubuntu:16.04.2-5 +FROM registry.opensource.zalan.do/stups/ubuntu:16.04.2-6 #======================= # General Configuration diff --git a/requirements.txt b/requirements.txt index 3efd9cd..c5c8b6c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,8 +1,9 @@ -autopep8==1.2.4 -coverage==4.2 +autopep8==1.3.2 +coverage==4.4.1 +enum34==1.1.6 flake8>=2.5.1,<2.6 locustio==0.7.3 mock==2.0.0 nose==1.3.7 -requests>=2.9.0 -requests_mock>=1.0.0 +requests>=2.18.1 +requests_mock>=1.3.0