summary refs log tree commit diff
path: root/Dockerfile
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--Dockerfile13
1 files changed, 7 insertions, 6 deletions
diff --git a/Dockerfile b/Dockerfile
index 5f0433004f..277246b697 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -2,15 +2,16 @@ FROM python:2-alpine
 
 RUN apk add --no-cache --virtual .nacl_deps build-base libffi-dev zlib-dev openssl-dev libjpeg-turbo-dev linux-headers
 
-COPY synapse /usr/local/src/synapse
-COPY setup.py setup.cfg README.rst synctl /usr/local/src/
+COPY . /synapse
 
-RUN cd /usr/local/src \
- && pip install --upgrade --process-dependency-links . \
+# A wheel cache may be provided in ./cache for faster build
+RUN cd /synapse \
+ && pip install --upgrade pip setuptools \
+ && mkdir -p /synapse/cache \
+ && pip install -f /synapse/cache --upgrade --process-dependency-links . \
+ && mv /synapse/contrib/docker/* / \
  && rm -rf setup.py setup.cfg synapse
 
-COPY contrib/docker /
-
 VOLUME ["/data"]
 
 ENTRYPOINT ["/start.py"]