Make and install the sdist version instead

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
Roberto Rosario
2019-05-13 13:19:36 -04:00
parent f3a849c031
commit d4130cd393

View File

@@ -76,7 +76,6 @@ COPY --chown=mayan:mayan \
README.md \ README.md \
README.rst \ README.rst \
setup.py \ setup.py \
Makefile \
/src/ /src/
COPY --chown=mayan:mayan mayan /src/mayan COPY --chown=mayan:mayan mayan /src/mayan
@@ -90,14 +89,11 @@ apt-get install -y --no-install-recommends \
libpng-dev \ libpng-dev \
libpq-dev \ libpq-dev \
libtiff-dev \ libtiff-dev \
make \
python-wheel \
zlib1g-dev \ zlib1g-dev \
libssl-dev \ libssl-dev \
g++ \ g++ \
gcc \ gcc \
python-dev \ python-dev \
python-setuptools \
python-virtualenv \ python-virtualenv \
&& mkdir -p "${PROJECT_INSTALL_DIR}" \ && mkdir -p "${PROJECT_INSTALL_DIR}" \
&& chown -R mayan:mayan "${PROJECT_INSTALL_DIR}" \ && chown -R mayan:mayan "${PROJECT_INSTALL_DIR}" \
@@ -114,9 +110,9 @@ RUN python -m virtualenv "${PROJECT_INSTALL_DIR}" \
# Install the Python packages needed to build Mayan EDMS # Install the Python packages needed to build Mayan EDMS
&& pip install --no-cache-dir --no-use-pep517 -r /src/requirements/build.txt \ && pip install --no-cache-dir --no-use-pep517 -r /src/requirements/build.txt \
# Build Mayan EDMS # Build Mayan EDMS
&& make python-wheel \ && python setup.py sdist \
# Install the built Mayan EDMS package # Install the built Mayan EDMS package
&& pip install --no-cache-dir --no-use-pep517 dist/*.whl \ && pip install --no-cache-dir --no-use-pep517 dist/mayan* \
# Install the static content # Install the static content
&& mayan-edms.py installjavascript \ && mayan-edms.py installjavascript \
&& MAYAN_STATIC_ROOT=${PROJECT_INSTALL_DIR}/static mayan-edms.py preparestatic --link --noinput && MAYAN_STATIC_ROOT=${PROJECT_INSTALL_DIR}/static mayan-edms.py preparestatic --link --noinput
@@ -147,5 +143,7 @@ RUN ${PROJECT_INSTALL_DIR}/bin/mayan-edms.py platformtemplate supervisord_docker
&& apt-get autoremove --purge -y \ && apt-get autoremove --purge -y \
&& rm -rf /var/lib/apt/lists/* \ && rm -rf /var/lib/apt/lists/* \
&& rm -f /var/cache/apt/archives/*.deb \ && rm -f /var/cache/apt/archives/*.deb \
# Remove temporary files owned by root from the platformtemplate step
&& rm /tmp/* \
# Keep displaying log messages to stdout # Keep displaying log messages to stdout
&& find /var/log -type f | while read f; do echo -ne '' > $f; done; && find /var/log -type f | while read f; do echo -ne '' > $f; done;