forked from kiwitcms/Kiwi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.buildroot
38 lines (29 loc) · 1.54 KB
/
Dockerfile.buildroot
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
FROM centos:centos7
RUN rpm -Uhv https://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/e/epel-release-7-11.noarch.rpm && \
yum -y --setopt=tsflags=nodocs install centos-release-scl && \
yum -y --setopt=tsflags=nodocs install rh-python36 gcc mariadb-devel \
postgresql-devel httpd-devel gettext npm which unzip libffi-devel && \
yum clean all
# make sure Python 3.6 is enabled by default
ENV PATH /venv/bin:/opt/rh/rh-python36/root/usr/bin${PATH:+:${PATH}} \
LD_LIBRARY_PATH /opt/rh/rh-python36/root/usr/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}} \
PKG_CONFIG_PATH /opt/rh/rh-python36/root/usr/lib64/pkgconfig${PKG_CONFIG_PATH:+:${PKG_CONFIG_PATH}} \
XDG_DATA_DIRS "/opt/rh/rh-python36/root/usr/share:${XDG_DATA_DIRS:-/usr/local/share:/usr/share}" \
VIRTUAL_ENV /venv
# Create a virtualenv for the application dependencies
RUN virtualenv /venv
# because we get some errors from other packages which need newer versions
RUN pip install --upgrade pip setuptools
# replace standard mod_wsgi with one compiled for Python 3
RUN pip install --no-cache-dir --upgrade mod_wsgi
# build and install the application
COPY . /Kiwi/
WORKDIR /Kiwi
RUN sed -i "s/tcms.settings.devel/tcms.settings.product/" manage.py && \
./tests/check-build && \
pip install --no-cache-dir dist/kiwitcms-*.tar.gz
# install DB requirements b/c the rest should already be installed
RUN pip install --no-cache-dir -r requirements/mariadb.txt
RUN pip install --no-cache-dir -r requirements/postgres.txt
# compile gettext translations
RUN ./manage.py compilemessages