2

Im new to Docker and im having troubles porting my already existing and working Django project to Docker and im pretty much stuck right now since the issue is with the dependencies in my requirements.txt that are frozen and actually are working on my other environmets (Live on VPS with Ubuntu and Dev on a VM with Arch).

The issue itself is while migrating the DB with djangocms_text_ckeditor/html5lib and was reported under eg. https://github.com/divio/djangocms-text-ckeditor/issues/336.

How is the Docker environment different so that this error can occur on the same Base OS with the same Python- and dependency versions?

what i tried so far:

  • latest dependency versions (unfreeze)
  • different package versions as mentioned on the issue reports.
  • different python versions 3.4 - 3.6 (standart and alpine)(live runs on 3.5 standart)
  • different base image (ubuntu 16.04 - 16.06)
  • deleting package and package dependencies (leads to migration inconsistency)

The dependency versions of my requirements file:

djangocms-text-ckeditor==3.0.1
html5lib==0.9999999

Any ideas how to fix this issue?

J4ckN1x
  • 73
  • 1
  • 5
  • 1
    Please can you add pip logs, docker `python:2.7-onbuild` image is working with mentioned requirements. You can also add other requirements if possible, they might be causing the issue. – vedarthk May 18 '17 at 09:01
  • seems like i cant finde the pip logs in the container. only have a .cache file at the standart /$HOME/.pip location which is rather unhelpful. There are like 50, do you really wanna have each listed? – J4ckN1x May 18 '17 at 09:12
  • if you use `python:2.7-onbuild` or for that matter any version of python with `-onbuild` tag, the pip install happens while building the image. You will find the pip logs while building. For eg: here are the pip logs for the build which I tried: https://pastebin.com/qVgg15iH – vedarthk May 18 '17 at 11:20
  • https://pastebin.com/7DVWmTBK is the log. I really would like to stick to python 3+ and alpine if possible. – J4ckN1x May 18 '17 at 12:55
  • The log which you have shared is not complete it is truncated before the setup of `djangocms-text-ckeditor` starts. Please can you share the error which you are getting when you try to build the container image. I tried with `python:3.6-onbuild` and it works just fine for the mentioned requirements, here is the log: https://pastebin.com/VSBakufs – vedarthk May 18 '17 at 16:14
  • Thanks for your help, its not a issue when building the Image but when i try to run/migrate it. The Log is without Errors. – J4ckN1x May 18 '17 at 16:42
  • https://pastebin.com/z8V2pGn2 this is the error message im receiving during "docker-compose up" – J4ckN1x May 18 '17 at 16:52
  • When you are using docker for python there are multiple steps where one could go wrong. If you are using docker compose, here is what you can do: first check the docker build logs if `html5lib` is properly installed, second you login into the shell using `docker-compose run web python` here you can try importing `from html5lib import sanitizer, serializer, treebuilders, treewalkers`. Also you should consider adding the logs to the question so that others can get context of the problem. – vedarthk May 18 '17 at 18:12

0 Answers0