diff --git a/.gitignore b/.gitignore
index 75cfb4087a4a12a045bfcbf26e166eff91b4125d..37784224e7da7e2b4b2b02808e07206100020152 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,5 @@
 db.sqlite3
 playbook.retry
 *.egg-info
+build
+dist
diff --git a/Dockerfile b/Dockerfile
index 626f574532770858578761ff516acdb58a4a3725..9eaae2780e3c49bdcb32b7b01980c6ffad549f11 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -7,20 +7,17 @@ ARG GITLAB_TOKEN="gTPA5UQYesSuKMCRM2r_"
 # Add system dependencies
 RUN apk add --update --no-cache postgresql-dev jpeg-dev build-base wget gzip
 
-# Use current backend source code
-ADD . /backend
+# Setup frontend
+ENV FRONTEND_DIR="/frontend/dist"
+RUN mkdir /frontend && wget --header "PRIVATE-TOKEN: $GITLAB_TOKEN" https://gitlab.com/arkindex/frontend/-/jobs/artifacts/$FRONTEND_BRANCH/download?job=frontend -O /tmp/frontend.zip && unzip /tmp/frontend.zip -d /frontend && rm /tmp/frontend.zip
 
 # Install arkindex
-RUN pip3 install /backend
+ADD . /backend
+RUN cd /backend && python setup.py install
 
 # Setup gunicorn
 RUN pip3 install gunicorn
 
-# Setup frontend
-ENV FRONTEND_DIR="/frontend/dist"
-RUN wget --header "PRIVATE-TOKEN: $GITLAB_TOKEN" https://gitlab.com/arkindex/frontend/-/jobs/artifacts/$FRONTEND_BRANCH/download?job=frontend -O /tmp/frontend.zip && unzip /tmp/frontend.zip -d /frontend && rm /tmp/frontend.zip
-
 # Run through supervisor
 EXPOSE 80
-WORKDIR /backend
 CMD ["gunicorn", "--access-logfile=-", "--capture-output", "--bind=0.0.0.0:80", "--chdir=/backend", "arkindex.project.wsgi"]
diff --git a/setup.py b/setup.py
index 270d06082f6c8461d53ad06d8e0abceed6e6d916..775e1a8dd2b4ba9cc68c64a914af7d486ad847fb 100644
--- a/setup.py
+++ b/setup.py
@@ -1,5 +1,5 @@
 #!/usr/bin/env python
-from distutils.core import setup
+from setuptools import setup, find_packages
 
 with open('VERSION') as f:
     VERSION = f.read()
@@ -15,7 +15,7 @@ setup(
     author_email='abadie@teklia.com',
     url='https://arkindex.teklia.com',
     install_requires=requirements,
-    packages=['arkindex'],
+    packages=find_packages(),
     scripts=[
         'arkindex/manage.py',
     ],