Skip to content

Error occurs when building WireCloud 1.3 docker images #47

@fisuda

Description

@fisuda

Hi @aarranz,

A build error occurs in step 12/19 of Dockerfile for WireCloud 1.3.
It seems that this is because Django/channels 2.4.0 dropped support for Django < 2.2.

Step 12/19 : RUN adduser --system --group --shell /bin/bash wirecloud &&     pip install --no-cache-dir channels asgi_ipc asgi_redis asgi_rabbitmq wirecloud_keycloak &&     mkdir -p /opt/wirecloud_instance /var/www/static &&     cd /opt &&     wirecloud-admin startproject wirecloud_instance wirecloud_instance &&     chown -R wirecloud:wirecloud wirecloud_instance /var/www/static &&     chmod a+x wirecloud_instance/manage.py
 ---> Running in b0c6fa0417b4
Adding system user `wirecloud' (UID 101) ...
Adding new group `wirecloud' (GID 102) ...
Adding new user `wirecloud' (UID 101) with group `wirecloud' ...
Creating home directory `/home/wirecloud' ...
Collecting channels
  Downloading https://files.pythonhosted.org/packages/46/9e/289f34f101029c3c7aa4c90cfcc9fedf0a631880d4b3e47d994666ccf18c/channels-2.4.0-py2.py3-none-any.whl
Collecting asgi_ipc
  Downloading https://files.pythonhosted.org/packages/4c/da/f8356f2f2c7898c532a3d06638171183c3dbd401cff77eccb15985ed1a99/asgi_ipc-1.4.2-py2.py3-none-any.whl
Collecting asgi_redis
  Downloading https://files.pythonhosted.org/packages/63/c0/4a2d24cbc0d163ae02bb21eaa1d95311e3948a4fd532e2d6416a02e16471/asgi_redis-1.4.3-py2.py3-none-any.whl
Collecting asgi_rabbitmq
  Downloading https://files.pythonhosted.org/packages/6a/13/f00e11881657bb9157c102fbf70502c7e5df16b2edc158a1c2d8a755614f/asgi_rabbitmq-0.5.5-py3-none-any.whl
Collecting wirecloud_keycloak
  Downloading https://files.pythonhosted.org/packages/c5/52/7d58d398e43d955be5807f24147c15f40953ad30d68a668dc38b25044141/wirecloud_keycloak-0.2.3-py3-none-any.whl
Collecting Django>=2.2 (from channels)
  Downloading https://files.pythonhosted.org/packages/55/d1/8ade70e65fa157e1903fe4078305ca53b6819ab212d9fbbe5755afc8ea2e/Django-3.0.2-py3-none-any.whl (7.4MB)
Collecting asgiref~=3.2 (from channels)
  Downloading https://files.pythonhosted.org/packages/a5/cb/5a235b605a9753ebcb2730c75e610fb51c8cab3f01230080a8229fa36adb/asgiref-3.2.3-py2.py3-none-any.whl
Collecting daphne~=2.3 (from channels)
  Downloading https://files.pythonhosted.org/packages/3c/f6/2b5282e477379a106e095ca809b1e05a5581d3ee9d617b681714ae9ad294/daphne-2.4.1-py2.py3-none-any.whl
Collecting posix-ipc>=1.0.0 (from asgi_ipc)
  Downloading https://files.pythonhosted.org/packages/c9/3e/54217da71aa26b488295d878df4d3132093253b4ae5798ac66fcb6921ef0/posix_ipc-1.0.4.tar.gz (78kB)
Collecting msgpack-python (from asgi_ipc)
  Downloading https://files.pythonhosted.org/packages/8a/20/6eca772d1a5830336f84aca1d8198e5a3f4715cd1c7fc36d3cc7f7185091/msgpack-python-0.5.6.tar.gz (138kB)
Requirement already satisfied: six in /usr/local/lib/python3.6/site-packages (from asgi_ipc) (1.13.0)
Collecting redis~=2.10.6 (from asgi_redis)
  Downloading https://files.pythonhosted.org/packages/3b/f6/7a76333cf0b9251ecf49efff635015171843d9b977e4ffcf59f9c4428052/redis-2.10.6-py2.py3-none-any.whl (64kB)
Collecting pika~=0.11.0 (from asgi_rabbitmq)
  Downloading https://files.pythonhosted.org/packages/76/b4/0ada6918ac79ce4d8d45d0ba436ee21a1ef685047fb1dde4d2de0178b327/pika-0.11.2-py2.py3-none-any.whl (107kB)
Collecting cached-property (from asgi_rabbitmq)
  Downloading https://files.pythonhosted.org/packages/3b/86/85c1be2e8db9e13ef9a350aecd6dea292bd612fa288c2f40d035bb750ded/cached_property-1.5.1-py2.py3-none-any.whl
Requirement already satisfied: pyJwt>=1.7.1 in /usr/local/lib/python3.6/site-packages (from wirecloud_keycloak) (1.7.1)
Collecting cryptography>=2.6.1 (from wirecloud_keycloak)
  Downloading https://files.pythonhosted.org/packages/ca/9a/7cece52c46546e214e10811b36b2da52ce1ea7fa203203a629b8dfadad53/cryptography-2.8-cp34-abi3-manylinux2010_x86_64.whl (2.3MB)
Requirement already satisfied: wirecloud>=1.2.0 in /usr/local/lib/python3.6/site-packages (from wirecloud_keycloak) (1.3.1)
Requirement already satisfied: pytz in /usr/local/lib/python3.6/site-packages (from Django>=2.2->channels) (2019.3)
Collecting sqlparse>=0.2.2 (from Django>=2.2->channels)
  Downloading https://files.pythonhosted.org/packages/ef/53/900f7d2a54557c6a37886585a91336520e5539e3ae2423ff1102daf4f3a7/sqlparse-0.3.0-py2.py3-none-any.whl
Collecting autobahn>=0.18 (from daphne~=2.3->channels)
  Downloading https://files.pythonhosted.org/packages/b4/db/f9762ed48eeae8ca2c30c9313b8f0fc05843925ddf578db89bb67c9e1f44/autobahn-20.1.2-py2.py3-none-any.whl (767kB)
Collecting twisted[tls]>=18.7 (from daphne~=2.3->channels)
  Downloading https://files.pythonhosted.org/packages/88/e2/0c21fadf0dff02d145db02f24a6ed2c24993e7242d138babbca41de2f5a2/Twisted-19.10.0-cp36-cp36m-manylinux1_x86_64.whl (3.1MB)
Collecting cffi!=1.11.3,>=1.8 (from cryptography>=2.6.1->wirecloud_keycloak)
  Downloading https://files.pythonhosted.org/packages/49/72/0d42f94fe94afa8030350c26e9d787219f3f008ec9bf6b86c66532b29236/cffi-1.13.2-cp36-cp36m-manylinux1_x86_64.whl (397kB)
Requirement already satisfied: regex in /usr/local/lib/python3.6/site-packages (from wirecloud>=1.2.0->wirecloud_keycloak) (2019.11.1)
Requirement already satisfied: django-haystack<2.8.0,>=2.6.0 in /usr/local/lib/python3.6/site-packages (from wirecloud>=1.2.0->wirecloud_keycloak) (2.7.0)
Requirement already satisfied: lxml>=2.3 in /usr/local/lib/python3.6/site-packages (from wirecloud>=1.2.0->wirecloud_keycloak) (4.4.1)
Requirement already satisfied: django-relatives<1.0.0 in /usr/local/lib/python3.6/site-packages (from wirecloud>=1.2.0->wirecloud_keycloak) (0.3.1)
Requirement already satisfied: pyScss<2.0,>=1.3.4 in /usr/local/lib/python3.6/site-packages (from wirecloud>=1.2.0->wirecloud_keycloak) (1.3.5)
Requirement already satisfied: pillow in /usr/local/lib/python3.6/site-packages (from wirecloud>=1.2.0->wirecloud_keycloak) (6.2.1)
Requirement already satisfied: pycrypto in /usr/local/lib/python3.6/site-packages (from wirecloud>=1.2.0->wirecloud_keycloak) (2.6.1)
Requirement already satisfied: jsonpatch in /usr/local/lib/python3.6/site-packages (from wirecloud>=1.2.0->wirecloud_keycloak) (1.24)
Requirement already satisfied: markdown in /usr/local/lib/python3.6/site-packages (from wirecloud>=1.2.0->wirecloud_keycloak) (3.1.1)
Requirement already satisfied: requests>=2.1.0 in /usr/local/lib/python3.6/site-packages (from wirecloud>=1.2.0->wirecloud_keycloak) (2.22.0)
Requirement already satisfied: whoosh>=2.7.2 in /usr/local/lib/python3.6/site-packages (from wirecloud>=1.2.0->wirecloud_keycloak) (2.7.4)
Requirement already satisfied: selenium>=3.4 in /usr/local/lib/python3.6/site-packages (from wirecloud>=1.2.0->wirecloud_keycloak) (3.141.0)
Requirement already satisfied: Pygments in /usr/local/lib/python3.6/site-packages (from wirecloud>=1.2.0->wirecloud_keycloak) (2.4.2)
Requirement already satisfied: rdflib>=3.2.0 in /usr/local/lib/python3.6/site-packages (from wirecloud>=1.2.0->wirecloud_keycloak) (4.2.2)
Requirement already satisfied: user-agents in /usr/local/lib/python3.6/site-packages (from wirecloud>=1.2.0->wirecloud_keycloak) (2.0)
Requirement already satisfied: django-appconf<2.0,>=1.0.1 in /usr/local/lib/python3.6/site-packages (from wirecloud>=1.2.0->wirecloud_keycloak) (1.0.3)
Requirement already satisfied: django-compressor<2.3,>=2.0 in /usr/local/lib/python3.6/site-packages (from wirecloud>=1.2.0->wirecloud_keycloak) (2.2)
Collecting txaio>=18.8.1 (from autobahn>=0.18->daphne~=2.3->channels)
  Downloading https://files.pythonhosted.org/packages/e9/6d/e1a6f7835cde86728e5bb1f577be9b2d7d273fdb33c286e70b087d418ded/txaio-18.8.1-py2.py3-none-any.whl
Collecting incremental>=16.10.1 (from twisted[tls]>=18.7->daphne~=2.3->channels)
  Downloading https://files.pythonhosted.org/packages/f5/1d/c98a587dc06e107115cf4a58b49de20b19222c83d75335a192052af4c4b7/incremental-17.5.0-py2.py3-none-any.whl
Collecting attrs>=17.4.0 (from twisted[tls]>=18.7->daphne~=2.3->channels)
  Downloading https://files.pythonhosted.org/packages/a2/db/4313ab3be961f7a763066401fb77f7748373b6094076ae2bda2806988af6/attrs-19.3.0-py2.py3-none-any.whl
Collecting hyperlink>=17.1.1 (from twisted[tls]>=18.7->daphne~=2.3->channels)
  Downloading https://files.pythonhosted.org/packages/7f/91/e916ca10a2de1cb7101a9b24da546fb90ee14629e23160086cf3361c4fb8/hyperlink-19.0.0-py2.py3-none-any.whl
Collecting zope.interface>=4.4.2 (from twisted[tls]>=18.7->daphne~=2.3->channels)
  Downloading https://files.pythonhosted.org/packages/05/16/79fe71428c91673194a21fedcc46f7f1349db799bc2a65da4ffdbe570343/zope.interface-4.7.1-cp36-cp36m-manylinux2010_x86_64.whl (168kB)
Collecting constantly>=15.1 (from twisted[tls]>=18.7->daphne~=2.3->channels)
  Downloading https://files.pythonhosted.org/packages/b9/65/48c1909d0c0aeae6c10213340ce682db01b48ea900a7d9fce7a7910ff318/constantly-15.1.0-py2.py3-none-any.whl
Collecting Automat>=0.3.0 (from twisted[tls]>=18.7->daphne~=2.3->channels)
  Downloading https://files.pythonhosted.org/packages/e5/11/756922e977bb296a79ccf38e8d45cafee446733157d59bcd751d3aee57f5/Automat-0.8.0-py2.py3-none-any.whl
Collecting PyHamcrest>=1.9.0 (from twisted[tls]>=18.7->daphne~=2.3->channels)
  Downloading https://files.pythonhosted.org/packages/92/1e/a87588eb4e301f7d7a945f7ca6aa430d9fc3f30022aa3984691f6e310162/PyHamcrest-1.10.1-py3-none-any.whl (48kB)
Collecting pyopenssl>=16.0.0; extra == "tls" (from twisted[tls]>=18.7->daphne~=2.3->channels)
  Downloading https://files.pythonhosted.org/packages/9e/de/f8342b68fa9e981d348039954657bdf681b2ab93de27443be51865ffa310/pyOpenSSL-19.1.0-py2.py3-none-any.whl (53kB)
Requirement already satisfied: idna!=2.3,>=0.6; extra == "tls" in /usr/local/lib/python3.6/site-packages (from twisted[tls]>=18.7->daphne~=2.3->channels) (2.8)
Collecting service-identity>=18.1.0; extra == "tls" (from twisted[tls]>=18.7->daphne~=2.3->channels)
  Downloading https://files.pythonhosted.org/packages/e9/7c/2195b890023e098f9618d43ebc337d83c8b38d414326685339eb024db2f6/service_identity-18.1.0-py2.py3-none-any.whl
Collecting pycparser (from cffi!=1.11.3,>=1.8->cryptography>=2.6.1->wirecloud_keycloak)
  Downloading https://files.pythonhosted.org/packages/68/9e/49196946aee219aead1290e00d1e7fdeab8567783e83e1b9ab5585e6206a/pycparser-2.19.tar.gz (158kB)
Requirement already satisfied: jsonpointer>=1.9 in /usr/local/lib/python3.6/site-packages (from jsonpatch->wirecloud>=1.2.0->wirecloud_keycloak) (2.0)
Requirement already satisfied: setuptools>=36 in /usr/local/lib/python3.6/site-packages (from markdown->wirecloud>=1.2.0->wirecloud_keycloak) (41.0.1)
Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.6/site-packages (from requests>=2.1.0->wirecloud>=1.2.0->wirecloud_keycloak) (2019.9.11)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /usr/local/lib/python3.6/site-packages (from requests>=2.1.0->wirecloud>=1.2.0->wirecloud_keycloak) (3.0.4)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /usr/local/lib/python3.6/site-packages (from requests>=2.1.0->wirecloud>=1.2.0->wirecloud_keycloak) (1.25.6)
Requirement already satisfied: pyparsing in /usr/local/lib/python3.6/site-packages (from rdflib>=3.2.0->wirecloud>=1.2.0->wirecloud_keycloak) (2.4.4)
Requirement already satisfied: isodate in /usr/local/lib/python3.6/site-packages (from rdflib>=3.2.0->wirecloud>=1.2.0->wirecloud_keycloak) (0.6.0)
Requirement already satisfied: ua-parser>=0.8.0 in /usr/local/lib/python3.6/site-packages (from user-agents->wirecloud>=1.2.0->wirecloud_keycloak) (0.8.0)
Requirement already satisfied: rcssmin==1.0.6 in /usr/local/lib/python3.6/site-packages (from django-compressor<2.3,>=2.0->wirecloud>=1.2.0->wirecloud_keycloak) (1.0.6)
Requirement already satisfied: rjsmin==1.0.12 in /usr/local/lib/python3.6/site-packages (from django-compressor<2.3,>=2.0->wirecloud>=1.2.0->wirecloud_keycloak) (1.0.12)
Collecting pyasn1-modules (from service-identity>=18.1.0; extra == "tls"->twisted[tls]>=18.7->daphne~=2.3->channels)
  Downloading https://files.pythonhosted.org/packages/95/de/214830a981892a3e286c3794f41ae67a4495df1108c3da8a9f62159b9a9d/pyasn1_modules-0.2.8-py2.py3-none-any.whl (155kB)
Collecting pyasn1 (from service-identity>=18.1.0; extra == "tls"->twisted[tls]>=18.7->daphne~=2.3->channels)
  Downloading https://files.pythonhosted.org/packages/62/1e/a94a8d635fa3ce4cfc7f506003548d0a2447ae76fd5ca53932970fe3053f/pyasn1-0.4.8-py2.py3-none-any.whl (77kB)
Building wheels for collected packages: posix-ipc, msgpack-python, pycparser
  Building wheel for posix-ipc (setup.py): started
  Building wheel for posix-ipc (setup.py): finished with status 'done'
  Stored in directory: /tmp/pip-ephem-wheel-cache-1_pgjkwz/wheels/5a/5c/17/d0e2d421abaf3b4097bf9db11108380d734195c6d15c24269d
  Building wheel for msgpack-python (setup.py): started
  Building wheel for msgpack-python (setup.py): finished with status 'done'
  Stored in directory: /tmp/pip-ephem-wheel-cache-1_pgjkwz/wheels/d5/de/86/7fa56fda12511be47ea0808f3502bc879df4e63ab168ec0406
  Building wheel for pycparser (setup.py): started
  Building wheel for pycparser (setup.py): finished with status 'done'
  Stored in directory: /tmp/pip-ephem-wheel-cache-1_pgjkwz/wheels/f2/9a/90/de94f8556265ddc9d9c8b271b0f63e57b26fb1d67a45564511
Successfully built posix-ipc msgpack-python pycparser
ERROR: wirecloud 1.3.1 has requirement Django<1.12,>=1.10, but you'll have django 3.0.2 which is incompatible.
ERROR: django-haystack 2.7.0 has requirement Django<1.12,>=1.8, but you'll have django 3.0.2 which is incompatible.
ERROR: asgi-ipc 1.4.2 has requirement asgiref~=1.1.2, but you'll have asgiref 3.2.3 which is incompatible.
ERROR: asgi-redis 1.4.3 has requirement asgiref~=1.1.2, but you'll have asgiref 3.2.3 which is incompatible.
ERROR: asgi-rabbitmq 0.5.5 has requirement asgiref~=1.1.2, but you'll have asgiref 3.2.3 which is incompatible.
Installing collected packages: asgiref, sqlparse, Django, pycparser, cffi, cryptography, txaio, autobahn, incremental, attrs, hyperlink, zope.interface, constantly, Automat, PyHamcrest, pyopenssl, pyasn1, pyasn1-modules, service-identity, twisted, daphne, channels, posix-ipc, msgpack-python, asgi-ipc, redis, asgi-redis, pika, cached-property, asgi-rabbitmq, wirecloud-keycloak
  Found existing installation: Django 1.11.26
    Uninstalling Django-1.11.26:
      Successfully uninstalled Django-1.11.26
Successfully installed Automat-0.8.0 Django-3.0.2 PyHamcrest-1.10.1 asgi-ipc-1.4.2 asgi-rabbitmq-0.5.5 asgi-redis-1.4.3 asgiref-3.2.3 attrs-19.3.0 autobahn-20.1.2 cached-property-1.5.1 cffi-1.13.2 channels-2.4.0 constantly-15.1.0 cryptography-2.8 daphne-2.4.1 hyperlink-19.0.0 incremental-17.5.0 msgpack-python-0.5.6 pika-0.11.2 posix-ipc-1.0.4 pyasn1-0.4.8 pyasn1-modules-0.2.8 pycparser-2.19 pyopenssl-19.1.0 redis-2.10.6 service-identity-18.1.0 sqlparse-0.3.0 twisted-19.10.0 txaio-18.8.1 wirecloud-keycloak-0.2.3 zope.interface-4.7.1
WARNING: You are using pip version 19.1.1, however version 19.3.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Traceback (most recent call last):
  File "/usr/local/bin/wirecloud-admin", line 10, in <module>
    sys.exit(execute_from_command_line())
  File "/usr/local/lib/python3.6/site-packages/wirecloud/commons/wirecloud_admin.py", line 139, in execute_from_command_line
    from wirecloud.commons.commands.convert import ConvertCommand
  File "/usr/local/lib/python3.6/site-packages/wirecloud/commons/commands/convert.py", line 26, in <module>
    from wirecloud.commons.utils.template.parsers import TemplateParser
  File "/usr/local/lib/python3.6/site-packages/wirecloud/commons/utils/template/__init__.py", line 2, in <module>
    from wirecloud.commons.utils.template.parsers import ObsoleteFormatError, TemplateFormatError, TemplateParseException, TemplateParser
  File "/usr/local/lib/python3.6/site-packages/wirecloud/commons/utils/template/parsers/__init__.py", line 24, in <module>
    from wirecloud.commons.utils.template.parsers.json import JSONTemplateParser
  File "/usr/local/lib/python3.6/site-packages/wirecloud/commons/utils/template/parsers/json.py", line 26, in <module>
    from wirecloud.platform.wiring.utils import get_wiring_skeleton, parse_wiring_old_version
  File "/usr/local/lib/python3.6/site-packages/wirecloud/platform/wiring/utils.py", line 26, in <module>
    from wirecloud.commons.utils.http import get_absolute_static_url, get_current_domain
  File "/usr/local/lib/python3.6/site-packages/wirecloud/commons/utils/http.py", line 26, in <module>
    from django.core.urlresolvers import reverse
ModuleNotFoundError: No module named 'django.core.urlresolvers'
The command '/bin/sh -c adduser --system --group --shell /bin/bash wirecloud &&     pip install --no-cache-dir channels asgi_ipc asgi_redis asgi_rabbitmq wirecloud_keycloak &&     mkdir -p /opt/wirecloud_instance /var/www/static &&     cd /opt &&     wirecloud-admin startproject wirecloud_instance wirecloud_instance &&     chown -R wirecloud:wirecloud wirecloud_instance /var/www/static &&     chmod a+x wirecloud_instance/manage.py' returned a non-zero code: 1
  • My build environment
$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 18.04.3 LTS
Release:	18.04
Codename:	bionic
$ uname -a
Linux ubuntu 4.15.0-74-generic #84-Ubuntu SMP Thu Dec 19 08:06:28 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
$ docker version
Client: Docker Engine - Community
 Version:           19.03.5
 API version:       1.40
 Go version:        go1.12.12
 Git commit:        633a0ea838
 Built:             Wed Nov 13 07:29:52 2019
 OS/Arch:           linux/amd64
 Experimental:      false

Server: Docker Engine - Community
 Engine:
  Version:          19.03.5
  API version:      1.40 (minimum version 1.12)
  Go version:       go1.12.12
  Git commit:       633a0ea838
  Built:            Wed Nov 13 07:28:22 2019
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.2.10
  GitCommit:        b34a5c8af56e510852c35414db4c1f4fa6172339
 runc:
  Version:          1.0.0-rc8+dev
  GitCommit:        3e425f80a8c931f88e6d94a8c831b9d5aa481657
 docker-init:
  Version:          0.18.0
  GitCommit:        fec3683

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