skip to Main Content

I tried to clone docker-wagtail-develop so I can run docker and improve my wagtail skills.

However, when I run the command: docker-compose built I received the below error code. I run the code from my terminal, I also tried with pycharm (i.e. with a virtualenv before I cloned), in both cases the outcome was the same.

Though I manage to run other wagtail-docker projects on my machine, it might be worth noting that:

  • use windows 10, configured so docker uses WSL2.
  • I can find alternatives with wagtail+docker but his seems like a sweet project, tailored for my needs.

I looked for similar issue but didn’t find a solution. Any help or reading reference would be highly appreciated.

...wagtail-dev>docker-compose build
WARNING: The PYTHONPATH variable is not set. Defaulting to a blank string.
db uses an image, skipping
Building frontend
[+] Building 8.0s (8/8) FINISHED
 => [internal] load build definition from Dockerfile.frontend                                                                                                                      0.1s
 => => transferring dockerfile: 196B                                                                                                                                               0.0s
 => [internal] load .dockerignore                                                                                                                                                  0.0s
 => => transferring context: 35B                                                                                                                                                   0.0s
 => [internal] load metadata for docker.io/library/node:10-slim                                                                                                                    3.0s
 => [internal] load build context                                                                                                                                                  4.7s
 => => transferring context: 115B                                                                                                                                                  4.7s
 => [1/3] FROM docker.io/library/node:10-slim@sha256:88932859e3d022d79161b99628c4c2c50e836437455e2d1b1a008d98367b10d6                                                              0.0s
 => CACHED [2/3] COPY ./wagtail/package.json ./wagtail/package-lock.json ./                                                                                                        0.0s
 => CACHED [3/3] RUN npm --prefix / install                                                                                                                                        0.0s
 => exporting to image                                                                                                                                                             0.1s
 => => exporting layers                                                                                                                                                            0.0s
 => => writing image sha256:00345b878ca38743fc778c1bbd72d062634ce40492f8b038501d60204ba377ad                                                                                       0.0s
 => => naming to docker.io/library/wagtail-dev_frontend                                                                                                                            0.0s
Building web
[+] Building 8.0s (6/10)
 => [internal] load build definition from Dockerfile                                                                                                                               0.0s
 => => transferring dockerfile: 925B                                                                                                                                               0.0s
 => [internal] load .dockerignore                                                                                                                                                  0.0s
 => => transferring context: 35B                                                                                                                                                   0.0s
 => [internal] load metadata for docker.io/library/python:3.7                                                                                                                      0.7s
 => CACHED [1/6] FROM docker.io/library/python:3.7@sha256:6790dfb201d2fa06b0935ea0bfa1227d2240280af56d0fe08772b11eb31402b5                                                         0.0s
 => [internal] load build context                                                                                                                                                  3.6s
 => => transferring context: 31.26MB                                                                                                                                               3.2s
 => ERROR [2/6] RUN apt-get update -y     && apt-get install -y libenchant-dev postgresql-client     && mkdir -p /code/requirements                                                6.4s
------
 > [2/6] RUN apt-get update -y     && apt-get install -y libenchant-dev postgresql-client     && mkdir -p /code/requirements:
#5 2.368 Get:1 http://deb.debian.org/debian bullseye InRelease [113 kB]
#5 2.368 Get:2 http://security.debian.org/debian-security bullseye-security InRelease [44.1 kB]
#5 2.409 Get:3 http://deb.debian.org/debian bullseye-updates InRelease [36.8 kB]
#5 2.839 Get:4 http://security.debian.org/debian-security bullseye-security/main amd64 Packages [28.2 kB]
#5 3.124 Get:5 http://deb.debian.org/debian bullseye/main amd64 Packages [8178 kB]
#5 5.183 Fetched 8399 kB in 3s (2731 kB/s)
#5 5.183 Reading package lists...
#5 5.652 Reading package lists...
#5 6.083 Building dependency tree...
#5 6.176 Reading state information...
#5 6.261 E: Unable to locate package libenchant-dev
------
executor failed running [/bin/sh -c apt-get update -y     && apt-get install -y libenchant-dev postgresql-client     && mkdir -p /code/requirements]: exit code: 100
ERROR: Service 'web' failed to build : Build failed

2

Answers


  1. First of all, docker-wagtail-develop is to develop the Wagtail and Wagtail Bakery projects source code. It is not for creating your own site.

    If you’d like to create a Wagtail site, follow the getting started documentation.
    https://docs.wagtail.io/en/stable/getting_started/index.html

    It lets you setup the default project template, which contains a docker file to run your project.
    https://docs.wagtail.io/en/stable/reference/project_template.html?#dockerfile

    Now to the actual error: Unable to locate package libenchant-dev. I don’t know why libenchant-dev can’t be located. So thank you for raising the issue.

    I do know that libenchant-dev is a wrapper library for various spell checker engines. It is used to spellcheck the Wagtail documentation (on build). I think it is something you can do without.

    Change the Dockerfile:

    -RUN apt-get update -y 
    -    && apt-get install -y libenchant-dev postgresql-client 
    -    && mkdir -p /code/requirements
    +RUN apt-get update -y
    +# RUN apt-get install -y libenchant-dev
    +RUN apt-get install -y postgresql-client
    +RUN mkdir -p /code/requirements
    

    And run docker-compose build. The build should finish.

    Login or Signup to reply.
  2. Replace libenchant-dev by libenchant-2-dev. The former seems to not be supported anymore.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search