From 68bd31dd02a725257f3625ba221970a92e9eb396 Mon Sep 17 00:00:00 2001 From: Adar Nimrod <nimrod@shore.co.il> Date: Sun, 11 Jul 2021 20:38:24 +0300 Subject: [PATCH] Rebase on UBI (Centos) 7. The manylinux image is building Python in a way that doesn't allow linking to libpython. That's reasonable for most cases, but Pyinstaller needs to bundle it for creating a single executable. Instead go for the base image and use the OS packaged Python. --- Dockerfile | 44 +++++++++++++++++++++++++++++++++++++++----- 1 file changed, 39 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index d8b87bf..f0294f5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,42 @@ # hadolint ignore=DL3006 -FROM quay.io/pypa/manylinux2014_x86_64 -ENV PATH /opt/python/cp36-cp36m/bin:/opt/rh/devtoolset-9/root/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin -# hadolint ignore=DL3013 -RUN pip install --no-cache-dir --progress-bar=off \ +FROM registry.access.redhat.com/ubi7/ubi +# hadolint ignore=DL3013,DL3033 +RUN yum install -y --disableplugin=subscription-manager \ + autoconf \ + automake \ + binutils \ + bison \ + byacc \ + cscope \ + ctags \ + diffstat \ + doxygen \ + elfutils \ + flex \ + gcc \ + gcc-c++ \ + gcc-gfortran \ + gettext \ + git \ + indent \ + intltool \ + libtool \ + make \ + patch \ + patchutils \ + pkgconfig \ + rcs \ + redhat-rpm-config \ + rh-python36-python-devel \ + rh-python36-python-pip \ + rpm-build \ + rpm-sign \ + subversion \ + swig \ + systemtap \ + && \ + yum --disableplugin=subscription-manager clean all && \ + pip install --no-cache-dir --progress-bar=off \ docutils \ pipenv \ poetry \ @@ -12,4 +46,4 @@ RUN pip install --no-cache-dir --progress-bar=off \ twine \ wheel \ && \ - rm -rf /tmp/* /var/tmp/* /root/.cache/* + rm -rf /tmp/* /var/tmp/* ~/.cache/* /var/cache/yum/* -- GitLab