Dockerfile 1.2KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. FROM debian:jessie
  2. MAINTAINER contact@algoo.fr
  3. # TODO: See GOOD PRATICE (remove apt lists, cache, etc)
  4. # Install required packages
  5. RUN apt-get update -q \
  6. && DEBIAN_FRONTEND=noninteractive apt-get install -yq --no-install-recommends \
  7. git \
  8. locales \
  9. realpath \
  10. python3 \
  11. python3-dev \
  12. python3-pip \
  13. build-essential \
  14. libxml2-dev \
  15. libxslt1-dev \
  16. python-lxml \
  17. postgresql-server-dev-all \
  18. postgresql \
  19. postgresql-client \
  20. uwsgi \
  21. uwsgi-plugin-python3
  22. # Ensure UTF-8
  23. RUN locale-gen en_US.UTF-8 en_us \
  24. && dpkg-reconfigure locales \
  25. && locale-gen C.UTF-8 \
  26. && /usr/sbin/update-locale LANG=C.UTF-8
  27. ENV LANG C.UTF-8
  28. ENV LANGUAGE C.UTF-8
  29. ENV LC_ALL C.UTF-8
  30. # Download and install Tracim
  31. RUN git clone https://github.com/tracim/tracim.git \
  32. && cd /tracim/tracim \
  33. && python3 setup.py develop \
  34. && cd /tracim \
  35. && pip3 install -r install/requirements.txt
  36. # Prepare volumes
  37. RUN mkdir /etc/tracim
  38. VOLUME ["/etc/tracim"]
  39. # Copy needed files
  40. COPY uwsgi.ini /tracim/tracim/uwsgi.ini.template
  41. COPY wsgi.py /tracim/tracim/wsgi.py
  42. COPY entrypoint.sh /tracim/entrypoint.sh
  43. # Set the default entry point
  44. CMD ["/tracim/entrypoint.sh"]