Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

image build fails #41

Closed
tomfankhaenel opened this issue Sep 28, 2022 · 2 comments
Closed

image build fails #41

tomfankhaenel opened this issue Sep 28, 2022 · 2 comments

Comments

@tomfankhaenel
Copy link

tomfankhaenel commented Sep 28, 2022

I added my required components and the versions in the .docker_build file and executed the render.sh
The build fails at the pip upgrade step and can also be reproduced by just generating the Dockerfile with an empty configuration.

docker build -t ${SERVICE}-mgmt:${TAG} .
Sending build context to Docker daemon  271.9kB
Step 1/45 : ARG ROCKYLINUX_VERSION=8
Step 2/45 : FROM rockylinux/rockylinux:${ROCKYLINUX_VERSION}
 ---> 523ffac7fb2e
Step 3/45 : RUN yum update -y &&   yum install -y   yum-utils   wget   jq   unzip   vim   git   bash-completion   glibc   findutils &&   yum clean all
 ---> Using cache
 ---> 4f41da52acc8
Step 4/45 : ARG PYTHON_VERSION=3
 ---> Using cache
 ---> 64470c4d833a
Step 5/45 : ARG PACKAGES
 ---> Using cache
 ---> 629cd476ec06
Step 6/45 : WORKDIR /root
 ---> Using cache
 ---> e3b38c68eaf4
Step 7/45 : RUN yum install -y python${PYTHON_VERSION} python${PYTHON_VERSION}-pip &&     yum clean all
 ---> Using cache
 ---> 3ed06670c314
Step 8/45 : RUN pip3 list -o --format freeze | cut -d'=' -f1 | xargs -n1 pip3 install --upgrade
 ---> Running in 5db09a5f2b60
WARNING: Running pip install with root privileges is generally not a good idea. Try `pip3 install --user` instead.
Collecting dbus-python
  Downloading https://files.pythonhosted.org/packages/b1/5c/ccfc167485806c1936f7d3ba97db6c448d0089c5746ba105b6eb22dba60e/dbus-python-1.2.18.tar.gz (578kB)
Installing collected packages: dbus-python
  Running setup.py install for dbus-python: started
    Running setup.py install for dbus-python: finished with status 'error'
    Complete output from command /usr/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-yi67trxl/dbus-python/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-bbp29pdy-record/install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    creating /tmp/pip-build-yi67trxl/dbus-python/build
    creating /tmp/pip-build-yi67trxl/dbus-python/build/temp.linux-x86_64-3.6
    checking whether make supports nested variables... no
    checking whether to enable maintainer-specific portions of Makefiles... no
    checking for gcc... no
    checking for cc... no
    checking for cl.exe... no
    configure: error: in `/tmp/pip-build-yi67trxl/dbus-python/build/temp.linux-x86_64-3.6':
    configure: error: no acceptable C compiler found in $PATH
    See `config.log' for more details
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-yi67trxl/dbus-python/setup.py", line 111, in <module>
        tests_require=['tap.py'],
      File "/usr/lib/python3.6/site-packages/setuptools/__init__.py", line 129, in setup
        return distutils.core.setup(**attrs)
      File "/usr/lib64/python3.6/distutils/core.py", line 148, in setup
        dist.run_commands()
      File "/usr/lib64/python3.6/distutils/dist.py", line 955, in run_commands
        self.run_command(cmd)
      File "/usr/lib64/python3.6/distutils/dist.py", line 974, in run_command
        cmd_obj.run()
      File "/usr/lib/python3.6/site-packages/setuptools/command/install.py", line 61, in run
        return orig.install.run(self)
      File "/usr/lib64/python3.6/distutils/command/install.py", line 556, in run
        self.run_command('build')
      File "/usr/lib64/python3.6/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/usr/lib64/python3.6/distutils/dist.py", line 974, in run_command
        cmd_obj.run()
      File "/tmp/pip-build-yi67trxl/dbus-python/setup.py", line 64, in run
        cwd=builddir)
      File "/usr/lib64/python3.6/subprocess.py", line 311, in check_call
        raise CalledProcessError(retcode, cmd)
    subprocess.CalledProcessError: Command '['/tmp/pip-build-yi67trxl/dbus-python/configure', '--disable-maintainer-mode', 'PYTHON=/usr/bin/python3.6', '--prefix=/tmp/pip-build-yi67trxl/dbus-python/build/temp.linux-x86_64-3.6/prefix']' returned non-zero exit status 1.
    
    ----------------------------------------
Command "/usr/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-yi67trxl/dbus-python/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-bbp29pdy-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-yi67trxl/dbus-python/
WARNING: Running pip install with root privileges is generally not a good idea. Try `pip3 install --user` instead.
Collecting pip
  Downloading https://files.pythonhosted.org/packages/a4/6d/6463d49a933f547439d6b5b98b46af8742cc03ae83543e4d7688c2420f8b/pip-21.3.1-py3-none-any.whl (1.7MB)
Installing collected packages: pip
Successfully installed pip-21.3.1
Requirement already satisfied: python-dateutil in /usr/lib/python3.6/site-packages (2.6.1)
Collecting python-dateutil
  Downloading python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
Requirement already satisfied: six>=1.5 in /usr/lib/python3.6/site-packages (from python-dateutil) (1.11.0)
Installing collected packages: python-dateutil
  Attempting uninstall: python-dateutil
    Found existing installation: python-dateutil 2.6.1
    Uninstalling python-dateutil-2.6.1:
      Successfully uninstalled python-dateutil-2.6.1
Successfully installed python-dateutil-2.8.2
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
Requirement already satisfied: setuptools in /usr/lib/python3.6/site-packages (39.2.0)
Collecting setuptools
  Downloading setuptools-59.6.0-py3-none-any.whl (952 kB)
Installing collected packages: setuptools
  Attempting uninstall: setuptools
    Found existing installation: setuptools 39.2.0
    Uninstalling setuptools-39.2.0:
      Successfully uninstalled setuptools-39.2.0
Successfully installed setuptools-59.6.0
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
Requirement already satisfied: six in /usr/lib/python3.6/site-packages (1.11.0)
Collecting six
  Downloading six-1.16.0-py2.py3-none-any.whl (11 kB)
Installing collected packages: six
  Attempting uninstall: six
    Found existing installation: six 1.11.0
    Uninstalling six-1.11.0:
      Successfully uninstalled six-1.11.0
Successfully installed six-1.16.0
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
The command '/bin/sh -c pip3 list -o --format freeze | cut -d'=' -f1 | xargs -n1 pip3 install --upgrade' returned a non-zero code: 123
@rndmh3ro
Copy link
Collaborator

I noticed the same problem, my current workaround is to remove the upgrade step: https://github.com/T-Systems-MMS/docker-management-container/pull/39/files

@michaelamattes will take a look.

@rndmh3ro
Copy link
Collaborator

fixed by #42

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants