Dockerfile 1.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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. mysql-client \
  23. libmysqld-dev
  24. # Ensure UTF-8
  25. RUN locale-gen en_US.UTF-8 en_us \
  26. && dpkg-reconfigure locales \
  27. && locale-gen C.UTF-8 \
  28. && /usr/sbin/update-locale LANG=C.UTF-8
  29. ENV LANG C.UTF-8
  30. ENV LANGUAGE C.UTF-8
  31. ENV LC_ALL C.UTF-8
  32. # Download and install Tracim
  33. RUN git clone https://github.com/tracim/tracim.git \
  34. && cd /tracim/tracim \
  35. && python3 setup.py develop \
  36. && cd /tracim \
  37. && pip3 install -r install/requirements.txt\
  38. && pip3 install https://launchpad.net/oursql/py3k/py3k-0.9.4/+download/oursql-0.9.4.zip \
  39. && echo 20161216001
  40. # Prepare volumes
  41. RUN mkdir /etc/tracim
  42. VOLUME ["/etc/tracim"]
  43. # Copy needed files
  44. COPY uwsgi.ini /tracim/tracim/uwsgi.ini.template
  45. COPY wsgi.py /tracim/tracim/wsgi.py
  46. COPY check_env_vars.sh /tracim/check_env_vars.sh
  47. COPY entrypoint.sh /tracim/entrypoint.sh
  48. # Set the default entry point
  49. CMD ["/tracim/entrypoint.sh"]