-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathDockerfile
40 lines (33 loc) · 1.04 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# Mozilla AutoPush Load-Tester
# SyncStorage-LoadTest
#
FROM python:3-slim
RUN mkdir -p /app
ADD . /app
WORKDIR /app
# Building:
# you can build a local docker image using
# `docker build . --tag syncstorage-loadtest:local`
# system setup
RUN \
BUILD_DEPS="git build-essential" && \
# wget not required but nice to have
RUN_DEPS="wget libssl-dev" && \
apt-get update && \
apt-get install -yq --no-install-recommends ${BUILD_DEPS} ${RUN_DEPS} && \
pip install virtualenv && \
python -m virtualenv -p `which python` apenv
# app install
RUN \
./apenv/bin/pip install pyasn1 && \
./apenv/bin/pip install -r requirements.txt && \
apt-get purge -yq --auto-remove ${BUILD_DEPS} && \
apt-get autoremove -yqq && \
apt-get clean -y
# Using:
# Start an interactive terminal using
# `docker run --net=host -it syncstorage-loadtest:local`
# This will start a bash shell as root.
# You can fire off a load test by calling:
# `SERVER_URL=http://${HOST}:${PORT}#${SECRET} ./apenv/bin/molotov -v`
ENTRYPOINT ["/bin/bash"]