Skip to content

Error running Docker-componse build  #127

@HappyNinja2

Description

@HappyNinja2

When I run docker-compose build I get the following error (note that python and setuptools are the latest version on the device):

Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-w44kketk/pytest-xdist/
You are using pip version 9.0.1, however version 20.1.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
ERROR: Service 'backend' failed to build: The command '/bin/sh -c pip install -r py-requirements/dev.txt' returned a non-zero code: 1

docker-compose build
nginx uses an image, skipping
Building postgres
Step 1/3 : FROM postgres:9.5.4
 ---> 2417ea518abc
Step 2/3 : ENV POSTGRES_USER postgres
 ---> Using cache
 ---> f64ceabf4cef
Step 3/3 : WORKDIR /
 ---> Using cache
 ---> 3c1f40ecff5e
Successfully built 3c1f40ecff5e
Successfully tagged django-react-redux-base_postgres:latest
Building backend
Step 1/8 : FROM python:3.4.3
 ---> 2b07576f6f81
Step 2/8 : MAINTAINER Filipe Garcia <filipe.garcia@seedstarslabs.com>
 ---> Using cache
 ---> 29a8f748dccf
Step 3/8 : ENV PYTHONUNBUFFERED 1
 ---> Using cache
 ---> 6d3ec7f9181e
Step 4/8 : COPY ./docker/django/django-entrypoint.sh /
 ---> Using cache
 ---> bb91df46e91c
Step 5/8 : COPY ./py-requirements /django/py-requirements
 ---> Using cache
 ---> 6d1d1bc41483
Step 6/8 : WORKDIR /django
 ---> Using cache
 ---> 526ae3d75196
Step 7/8 : RUN pip install pip==9.0.1
 ---> Using cache
 ---> dd48ca4e6cc6
Step 8/8 : RUN pip install -r py-requirements/dev.txt
 ---> Running in 8538b4a6b436
Collecting git+https://github.com/Seedstars/django-rest-logger.git (from -r py-requirements/base.txt (line 22))
  Cloning https://github.com/Seedstars/django-rest-logger.git to /tmp/pip-uxzzll16-build
Collecting Django==1.11.4 (from -r py-requirements/base.txt (line 1))
  Downloading https://files.pythonhosted.org/packages/fc/fb/01e0084061c50f1160c2db5565ff1c3d8d76f2a76f67cd282835ee64e04a/Django-1.11.4-py2.py3-none-any.whl (6.9MB)
Collecting django-extensions==1.8.1 (from -r py-requirements/base.txt (line 2))
  Downloading https://files.pythonhosted.org/packages/5f/aa/ec44557aae10616963d96be967caf6a1615fe3a4d3400666073c29640f4c/django_extensions-1.8.1-py2.py3-none-any.whl (204kB)
Collecting django-disposable-email-checker==1.2.1 (from -r py-requirements/base.txt (line 4))
  Downloading https://files.pythonhosted.org/packages/3f/9b/d7ef5f1dd983a4a610b4097a8092010ef95dbf8a3fe780277dfd6c308994/django_disposable_email_checker-1.2.1-py2.py3-none-any.whl
Collecting psycopg2==2.7.3 (from -r py-requirements/base.txt (line 7))
  Downloading https://files.pythonhosted.org/packages/93/54/78d05449901047b300de1fda9a964411cc48456839038a716f673bededd9/psycopg2-2.7.3-cp34-cp34m-manylinux1_x86_64.whl (2.7MB)
Collecting whitenoise==3.3.0 (from -r py-requirements/base.txt (line 10))
  Downloading https://files.pythonhosted.org/packages/86/b4/1aedb1ed7561087ba9f93592ef398cfd4ed7551503ae9f305311d0b6ed84/whitenoise-3.3.0-py2.py3-none-any.whl
Collecting djangorestframework==3.6.4 (from -r py-requirements/base.txt (line 13))
  Downloading https://files.pythonhosted.org/packages/12/22/98d2ea3089384b88f1ed86fb2799d8c57b59ce430c3972ec0f18986cd449/djangorestframework-3.6.4-py2.py3-none-any.whl (1.5MB)
Collecting raven==6.1.0 (from -r py-requirements/base.txt (line 16))
  Downloading https://files.pythonhosted.org/packages/17/c0/c78198b9f2459f28de1bcba7a3586602a5b85858e9657db59e881fbea89f/raven-6.1.0-py2.py3-none-any.whl (279kB)
Collecting python-dateutil==2.6.1 (from -r py-requirements/base.txt (line 19))
  Downloading https://files.pythonhosted.org/packages/4b/0d/7ed381ab4fe80b8ebf34411d14f253e1cf3e56e2820ffa1d8844b23859a2/python_dateutil-2.6.1-py2.py3-none-any.whl (194kB)
Collecting django-rest-knox==3.0.3 (from -r py-requirements/base.txt (line 24))
  Downloading https://files.pythonhosted.org/packages/84/e9/e60f25d317ce4d6c249e76251c60eaa5f7b246d67ae9a8ec9db49de3de80/django_rest_knox-3.0.3-py3-none-any.whl
Collecting mock==2.0.0 (from -r py-requirements/dev.txt (line 3))
  Downloading https://files.pythonhosted.org/packages/e6/35/f187bdf23be87092bd0f1200d43d23076cee4d0dec109f195173fd3ebc79/mock-2.0.0-py2.py3-none-any.whl (56kB)
Collecting factory-boy==2.9.2 (from -r py-requirements/dev.txt (line 4))
  Downloading https://files.pythonhosted.org/packages/81/b9/ca160fdcfd7313d59151aa60a2d2125d5677f4147a2c7e14a3736560e271/factory_boy-2.9.2-py2.py3-none-any.whl
Collecting prospector==0.12.7 (from -r py-requirements/dev.txt (line 6))
  Downloading https://files.pythonhosted.org/packages/f3/66/1b500570209f10c4dc8491e93505c8a52ca06953e25c7881159df3af6604/prospector-0.12.7.tar.gz (52kB)
Collecting bandit==1.4.0 (from -r py-requirements/dev.txt (line 7))
  Downloading https://files.pythonhosted.org/packages/77/41/d57366098a30a86af1821e231949221d2b6b896cc4bdd060cc1be27fdd47/bandit-1.4.0-py2.py3-none-any.whl (116kB)
Collecting pytest==3.2.1 (from -r py-requirements/dev.txt (line 9))
  Downloading https://files.pythonhosted.org/packages/e0/1e/d52c6a3a143935410ee33320341ea7bbb770ca8fe89c3d51e18254e0a2ba/pytest-3.2.1-py2.py3-none-any.whl (186kB)
Collecting pytest-cov==2.5.1 (from -r py-requirements/dev.txt (line 10))
  Downloading https://files.pythonhosted.org/packages/30/7d/7f6a78ae44a1248ee28cc777586c18b28a1df903470e5d34a6e25712b8aa/pytest_cov-2.5.1-py2.py3-none-any.whl
Collecting pytest-django==3.1.2 (from -r py-requirements/dev.txt (line 11))
  Downloading https://files.pythonhosted.org/packages/0f/c4/123ec7829e175af511c5be0501df9552261c2bf549b8e7a43ba35505594e/pytest_django-3.1.2-py2.py3-none-any.whl
Collecting pytest-pythonpath==0.7.1 (from -r py-requirements/dev.txt (line 12))
  Downloading https://files.pythonhosted.org/packages/ad/28/c0068d0bbdec562bacbe1de866138ae10241cc0b7eba7c4b8a2ac8d4474d/pytest-pythonpath-0.7.1.tar.gz
Collecting pytest-xdist==1.20.0 (from -r py-requirements/dev.txt (line 13))
  Downloading https://files.pythonhosted.org/packages/16/52/a76faa9f4ecede7dc9cc08177b65a90ed377136445edbb3f1a969b223ef5/pytest-xdist-1.20.0.tar.gz (56kB)
    Complete output from command python setup.py egg_info:
    /usr/local/lib/python3.4/site-packages/pkg_resources/__init__.py:2510: PEP440Warning: 'setuptools (scm-1.0.0)' is being parsed as a legacy, non PEP 440, version. You may find odd behavior and sort order. In particular it will be sorted as less than 0.0. It is recommend to migrate to PEP 440 compatible versions.
      PEP440Warning,
    /usr/local/lib/python3.4/site-packages/pkg_resources/__init__.py:2510: PEP440Warning: 'setuptools (scm-1.1.0)' is being parsed as a legacy, non PEP 440, version. You may find odd behavior and sort order. In particular it will be sorted as less than 0.0. It is recommend to migrate to PEP 440 compatible versions.
      PEP440Warning,
    /usr/local/lib/python3.4/site-packages/pkg_resources/__init__.py:2510: PEP440Warning: 'setuptools (scm-1.2.0)' is being parsed as a legacy, non PEP 440, version. You may find odd behavior and sort order. In particular it will be sorted as less than 0.0. It is recommend to migrate to PEP 440 compatible versions.
      PEP440Warning,
    /usr/local/lib/python3.4/site-packages/pkg_resources/__init__.py:2510: PEP440Warning: 'setuptools (scm-1.3.0)' is being parsed as a legacy, non PEP 440, version. You may find odd behavior and sort order. In particular it will be sorted as less than 0.0. It is recommend to migrate to PEP 440 compatible versions.
      PEP440Warning,
    /usr/local/lib/python3.4/site-packages/pkg_resources/__init__.py:2510: PEP440Warning: 'setuptools (scm-1.4.0)' is being parsed as a legacy, non PEP 440, version. You may find odd behavior and sort order. In particular it will be sorted as less than 0.0. It is recommend to migrate to PEP 440 compatible versions.
      PEP440Warning,
    /tmp/easy_install-6b0oxhiq/setuptools_scm-4.1.2/src
    <pkg_resources.WorkingSet object at 0x7f8022e646d8>
    warning: no previously-included files found matching '*.nix'
    warning: no previously-included files found matching '.travis.yaml'
    warning: no previously-included files found matching '.pre-commit-config.yaml'
    warning: install_lib: 'build/lib' does not exist -- no Python modules to install

    zip_safe flag not set; analyzing archive contents...

    Installed /tmp/pip-build-co4am_uy/pytest-xdist/.eggs/UNKNOWN-4.1.2-py3.4.egg
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-co4am_uy/pytest-xdist/setup.py", line 44, in <module>
        'Programming Language :: Python :: 3',
      File "/usr/local/lib/python3.4/distutils/core.py", line 108, in setup
        _setup_distribution = dist = klass(attrs)
      File "/usr/local/lib/python3.4/site-packages/setuptools/dist.py", line 265, in __init__
        self.fetch_build_eggs(attrs['setup_requires'])
      File "/usr/local/lib/python3.4/site-packages/setuptools/dist.py", line 311, in fetch_build_eggs
        replace_conflicting=True,
      File "/usr/local/lib/python3.4/site-packages/pkg_resources/__init__.py", line 805, in resolve
        raise DistributionNotFound(req)
    pkg_resources.DistributionNotFound: setuptools-scm
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-co4am_uy/pytest-xdist/
You are using pip version 9.0.1, however version 20.1.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
ERROR: Service 'backend' failed to build: The command '/bin/sh -c pip install -r py-requirements/dev.txt' returned a non-zero code: 1        
PS C:\Users\bob\Documents\GitHub\django-react-redux-base> docker-compose build
nginx uses an image, skipping
Building postgres
Step 1/3 : FROM postgres:9.5.4
 ---> 2417ea518abc
Step 2/3 : ENV POSTGRES_USER postgres
 ---> Using cache
 ---> f64ceabf4cef
Step 3/3 : WORKDIR /
 ---> Using cache
 ---> 3c1f40ecff5e
Successfully built 3c1f40ecff5e
Successfully tagged django-react-redux-base_postgres:latest
Building backend
Step 1/8 : FROM python:3.4.3
 ---> 2b07576f6f81
Step 2/8 : MAINTAINER Filipe Garcia <filipe.garcia@seedstarslabs.com>
 ---> Using cache
 ---> 29a8f748dccf
Step 3/8 : ENV PYTHONUNBUFFERED 1
 ---> Using cache
 ---> 6d3ec7f9181e
Step 4/8 : COPY ./docker/django/django-entrypoint.sh /
 ---> Using cache
 ---> bb91df46e91c
Step 5/8 : COPY ./py-requirements /django/py-requirements
 ---> a48a0997bf3a
Step 6/8 : WORKDIR /django
 ---> Running in 70aa2afeb511
Removing intermediate container 70aa2afeb511
 ---> 8e3f81bd7612
Step 7/8 : RUN pip install pip==9.0.1
 ---> Running in e8587b827acc
Collecting pip==9.0.1
  Downloading https://files.pythonhosted.org/packages/b6/ac/7015eb97dc749283ffdec1c3a88ddb8ae03b8fad0f0e611408f196358da3/pip-9.0.1-py2.py3-none-any.whl (1.3MB)
Installing collected packages: pip
  Found existing installation: pip 7.1.2
    Uninstalling pip-7.1.2:
      Successfully uninstalled pip-7.1.2
Successfully installed pip-9.0.1
You are using pip version 9.0.1, however version 20.1.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Removing intermediate container e8587b827acc
 ---> 40e577002d5a
Step 8/8 : RUN pip install -r py-requirements/dev.txt
 ---> Running in 09fabdbd1c29
Collecting git+https://github.com/Seedstars/django-rest-logger.git (from -r py-requirements/base.txt (line 22))
  Cloning https://github.com/Seedstars/django-rest-logger.git to /tmp/pip-ddp7ywqq-build
Collecting Django==1.11.29 (from -r py-requirements/base.txt (line 1))
  Downloading https://files.pythonhosted.org/packages/49/49/178daa8725d29c475216259eb19e90b2aa0b8c0431af8c7e9b490ae6481d/Django-1.11.29-py2.py3-none-any.whl (6.9MB)
Collecting django-extensions==1.8.1 (from -r py-requirements/base.txt (line 2))
  Downloading https://files.pythonhosted.org/packages/5f/aa/ec44557aae10616963d96be967caf6a1615fe3a4d3400666073c29640f4c/django_extensions-1.8.1-py2.py3-none-any.whl (204kB)
Collecting django-disposable-email-checker==1.2.1 (from -r py-requirements/base.txt (line 4))
  Downloading https://files.pythonhosted.org/packages/3f/9b/d7ef5f1dd983a4a610b4097a8092010ef95dbf8a3fe780277dfd6c308994/django_disposable_email_checker-1.2.1-py2.py3-none-any.whl
Collecting psycopg2==2.7.3 (from -r py-requirements/base.txt (line 7))
  Downloading https://files.pythonhosted.org/packages/93/54/78d05449901047b300de1fda9a964411cc48456839038a716f673bededd9/psycopg2-2.7.3-cp34-cp34m-manylinux1_x86_64.whl (2.7MB)
Collecting whitenoise==3.3.0 (from -r py-requirements/base.txt (line 10))
  Downloading https://files.pythonhosted.org/packages/86/b4/1aedb1ed7561087ba9f93592ef398cfd4ed7551503ae9f305311d0b6ed84/whitenoise-3.3.0-py2.py3-none-any.whl
Collecting djangorestframework==3.6.4 (from -r py-requirements/base.txt (line 13))
  Downloading https://files.pythonhosted.org/packages/12/22/98d2ea3089384b88f1ed86fb2799d8c57b59ce430c3972ec0f18986cd449/djangorestframework-3.6.4-py2.py3-none-any.whl (1.5MB)
Collecting raven==6.1.0 (from -r py-requirements/base.txt (line 16))
  Downloading https://files.pythonhosted.org/packages/17/c0/c78198b9f2459f28de1bcba7a3586602a5b85858e9657db59e881fbea89f/raven-6.1.0-py2.py3-none-any.whl (279kB)
Collecting python-dateutil==2.6.1 (from -r py-requirements/base.txt (line 19))
  Downloading https://files.pythonhosted.org/packages/4b/0d/7ed381ab4fe80b8ebf34411d14f253e1cf3e56e2820ffa1d8844b23859a2/python_dateutil-2.6.1-py2.py3-none-any.whl (194kB)
Collecting django-rest-knox==3.0.3 (from -r py-requirements/base.txt (line 24))
  Downloading https://files.pythonhosted.org/packages/84/e9/e60f25d317ce4d6c249e76251c60eaa5f7b246d67ae9a8ec9db49de3de80/django_rest_knox-3.0.3-py3-none-any.whl
Collecting mock==2.0.0 (from -r py-requirements/dev.txt (line 3))
  Downloading https://files.pythonhosted.org/packages/e6/35/f187bdf23be87092bd0f1200d43d23076cee4d0dec109f195173fd3ebc79/mock-2.0.0-py2.py3-none-any.whl (56kB)
Collecting factory-boy==2.9.2 (from -r py-requirements/dev.txt (line 4))
  Downloading https://files.pythonhosted.org/packages/81/b9/ca160fdcfd7313d59151aa60a2d2125d5677f4147a2c7e14a3736560e271/factory_boy-2.9.2-py2.py3-none-any.whl
Collecting prospector==0.12.7 (from -r py-requirements/dev.txt (line 6))
  Downloading https://files.pythonhosted.org/packages/f3/66/1b500570209f10c4dc8491e93505c8a52ca06953e25c7881159df3af6604/prospector-0.12.7.tar.gz (52kB)
Collecting bandit==1.4.0 (from -r py-requirements/dev.txt (line 7))
  Downloading https://files.pythonhosted.org/packages/77/41/d57366098a30a86af1821e231949221d2b6b896cc4bdd060cc1be27fdd47/bandit-1.4.0-py2.py3-none-any.whl (116kB)
Collecting pytest==3.2.1 (from -r py-requirements/dev.txt (line 9))
  Downloading https://files.pythonhosted.org/packages/e0/1e/d52c6a3a143935410ee33320341ea7bbb770ca8fe89c3d51e18254e0a2ba/pytest-3.2.1-py2.py3-none-any.whl (186kB)
Collecting pytest-cov==2.5.1 (from -r py-requirements/dev.txt (line 10))
  Downloading https://files.pythonhosted.org/packages/30/7d/7f6a78ae44a1248ee28cc777586c18b28a1df903470e5d34a6e25712b8aa/pytest_cov-2.5.1-py2.py3-none-any.whl
Collecting pytest-django==3.1.2 (from -r py-requirements/dev.txt (line 11))
  Downloading https://files.pythonhosted.org/packages/0f/c4/123ec7829e175af511c5be0501df9552261c2bf549b8e7a43ba35505594e/pytest_django-3.1.2-py2.py3-none-any.whl
Collecting pytest-pythonpath==0.7.1 (from -r py-requirements/dev.txt (line 12))
  Downloading https://files.pythonhosted.org/packages/ad/28/c0068d0bbdec562bacbe1de866138ae10241cc0b7eba7c4b8a2ac8d4474d/pytest-pythonpath-0.7.1.tar.gz
Collecting pytest-xdist==1.20.0 (from -r py-requirements/dev.txt (line 13))
  Downloading https://files.pythonhosted.org/packages/16/52/a76faa9f4ecede7dc9cc08177b65a90ed377136445edbb3f1a969b223ef5/pytest-xdist-1.20.0.tar.gz (56kB)
    Complete output from command python setup.py egg_info:
    /usr/local/lib/python3.4/site-packages/pkg_resources/__init__.py:2510: PEP440Warning: 'setuptools (scm-1.0.0)' is being parsed as a legacy, non PEP 440, version. You may find odd behavior and sort order. In particular it will be sorted as less than 0.0. It is recommend to migrate to PEP 440 compatible versions.
      PEP440Warning,
    /usr/local/lib/python3.4/site-packages/pkg_resources/__init__.py:2510: PEP440Warning: 'setuptools (scm-1.1.0)' is being parsed as a legacy, non PEP 440, version. You may find odd behavior and sort order. In particular it will be sorted as less than 0.0. It is recommend to migrate to PEP 440 compatible versions.
      PEP440Warning,
    /usr/local/lib/python3.4/site-packages/pkg_resources/__init__.py:2510: PEP440Warning: 'setuptools (scm-1.2.0)' is being parsed as a legacy, non PEP 440, version. You may find odd behavior and sort order. In particular it will be sorted as less than 0.0. It is recommend to migrate to PEP 440 compatible versions.
      PEP440Warning,
    /usr/local/lib/python3.4/site-packages/pkg_resources/__init__.py:2510: PEP440Warning: 'setuptools (scm-1.3.0)' is being parsed as a legacy, non PEP 440, version. You may find odd behavior and sort order. In particular it will be sorted as less than 0.0. It is recommend to migrate to PEP 440 compatible versions.
      PEP440Warning,
    /usr/local/lib/python3.4/site-packages/pkg_resources/__init__.py:2510: PEP440Warning: 'setuptools (scm-1.4.0)' is being parsed as a legacy, non PEP 440, version. You may find odd behavior and sort order. In particular it will be sorted as less than 0.0. It is recommend to migrate to PEP 440 compatible versions.
      PEP440Warning,
    /tmp/easy_install-l97mcius/setuptools_scm-4.1.2/src
    <pkg_resources.WorkingSet object at 0x7f1d087ce748>
    warning: no previously-included files found matching '*.nix'
    warning: no previously-included files found matching '.travis.yaml'
    warning: no previously-included files found matching '.pre-commit-config.yaml'
    warning: install_lib: 'build/lib' does not exist -- no Python modules to install

    zip_safe flag not set; analyzing archive contents...

    Installed /tmp/pip-build-w44kketk/pytest-xdist/.eggs/UNKNOWN-4.1.2-py3.4.egg
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-w44kketk/pytest-xdist/setup.py", line 44, in <module>
      File "/usr/local/lib/python3.4/distutils/core.py", line 108, in setup
        _setup_distribution = dist = klass(attrs)
      File "/usr/local/lib/python3.4/site-packages/setuptools/dist.py", line 265, in __init__
        self.fetch_build_eggs(attrs['setup_requires'])
      File "/usr/local/lib/python3.4/site-packages/setuptools/dist.py", line 311, in fetch_build_eggs
        replace_conflicting=True,
      File "/usr/local/lib/python3.4/site-packages/pkg_resources/__init__.py", line 805, in resolve
        raise DistributionNotFound(req)
    pkg_resources.DistributionNotFound: setuptools-scm

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-w44kketk/pytest-xdist/
You are using pip version 9.0.1, however version 20.1.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
ERROR: Service 'backend' failed to build: The command '/bin/sh -c pip install -r py-requirements/dev.txt' returned a non-zero code: 1    

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions