Dockerfile 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. FROM debian:wheezy
  2. RUN set -ex; \
  3. apt-get update -qq; \
  4. apt-get install -y \
  5. gcc \
  6. make \
  7. zlib1g \
  8. zlib1g-dev \
  9. libssl-dev \
  10. git \
  11. apt-transport-https \
  12. ca-certificates \
  13. curl \
  14. lxc \
  15. iptables \
  16. ; \
  17. rm -rf /var/lib/apt/lists/*
  18. # Build Python 2.7.9 from source
  19. RUN set -ex; \
  20. curl -LO https://www.python.org/ftp/python/2.7.9/Python-2.7.9.tgz; \
  21. tar -xzf Python-2.7.9.tgz; \
  22. cd Python-2.7.9; \
  23. ./configure --enable-shared; \
  24. make; \
  25. make install; \
  26. cd ..; \
  27. rm -rf /Python-2.7.9; \
  28. rm Python-2.7.9.tgz
  29. # Make libpython findable
  30. ENV LD_LIBRARY_PATH /usr/local/lib
  31. # Install setuptools
  32. RUN set -ex; \
  33. curl -LO https://bootstrap.pypa.io/ez_setup.py; \
  34. python ez_setup.py; \
  35. rm ez_setup.py
  36. # Install pip
  37. RUN set -ex; \
  38. curl -LO https://pypi.python.org/packages/source/p/pip/pip-7.0.1.tar.gz; \
  39. tar -xzf pip-7.0.1.tar.gz; \
  40. cd pip-7.0.1; \
  41. python setup.py install; \
  42. cd ..; \
  43. rm -rf pip-7.0.1; \
  44. rm pip-7.0.1.tar.gz
  45. ENV ALL_DOCKER_VERSIONS 1.6.0
  46. RUN set -ex; \
  47. curl https://get.docker.com/builds/Linux/x86_64/docker-1.6.0 -o /usr/local/bin/docker-1.6.0; \
  48. chmod +x /usr/local/bin/docker-1.6.0
  49. # Set the default Docker to be run
  50. RUN ln -s /usr/local/bin/docker-1.6.0 /usr/local/bin/docker
  51. RUN useradd -d /home/user -m -s /bin/bash user
  52. WORKDIR /code/
  53. ADD requirements.txt /code/
  54. RUN pip install -r requirements.txt
  55. ADD requirements-dev.txt /code/
  56. RUN pip install -r requirements-dev.txt
  57. ADD . /code/
  58. RUN python setup.py install
  59. RUN chown -R user /code/
  60. ENTRYPOINT ["/usr/local/bin/docker-compose"]