Dockerfile 1.4KB

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