sopel-irc / docker-sopel

:whale: Officially Unofficial™ Docker container for Sopel, a Python IRC bot
https://hub.docker.com/r/sopelirc/sopel
12 stars 6 forks source link

docker-image fails build #37

Closed danhimalplanet closed 3 years ago

danhimalplanet commented 3 years ago

docker-image fails build

using https://github.com/sopel-irc/docker-sopel/blob/master/Dockerfile 1f18c0e9f9125c4f047f8da0d7039799b68538d9

I tried several previous versions of the Dockerfile, same error.

Must be an external dependency I can't control.

$ docker build .
Sending build context to Docker daemon  9.216kB
Step 1/25 : ARG PYTHON_TAG=3.9-alpine
Step 2/25 : ARG SOPEL_GID=100000
Step 3/25 : ARG SOPEL_UID=100000                                                                                                                                               Step 4/25 : ARG SOPEL_REPO=https://github.com/sopel-irc/sopel.git
Step 5/25 : ARG SOPEL_BRANCH=v7.0.7
Step 6/25 : FROM alpine:latest AS git-fetch
 ---> 389fef711851
Step 7/25 : ARG SOPEL_REPO
 ---> Using cache
...
*********************
* Accelerated build *
*********************
creating /home/sopel/.local/lib/python3.9/site-packages/multidict-5.1.0-py3.9-linux-x86_64.egg
Extracting multidict-5.1.0-py3.9-linux-x86_64.egg to /home/sopel/.local/lib/python3.9/site-packages
Adding multidict 5.1.0 to easy-install.pth file

Installed /home/sopel/.local/lib/python3.9/site-packages/multidict-5.1.0-py3.9-linux-x86_64.egg
error: chardet 4.0.0 is installed but chardet<4.0,>=2.0 is required by {'aiohttp'}
The command '/bin/sh -c set -ex   && cd ./sopel-src   && su-exec sopel python setup.py install --user   && cd ..   && rm -rf ./sopel-src   && apk del .build-deps' returned a non-zero code: 1
HumorBaby commented 3 years ago

Yep, looks like this issue will persist pending https://github.com/aio-libs/aiohttp/issues/5366.

Until then, you can either

diff --git a/Dockerfile b/Dockerfile
index b35e043..1e37b6b 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -93,6 +93,7 @@ WORKDIR /home/sopel

 COPY --from=git-fetch --chown=sopel:sopel /sopel-src /home/sopel/sopel-src
 RUN set -ex \
+  && pip install 'chardet<4.0' \
   && cd ./sopel-src \
   && su-exec sopel python setup.py install --user \
   && cd .. \
dgw commented 3 years ago

This should be fixed, no? https://pypi.org/project/aiohttp/3.7.4.post0/#changelog

HumorBaby commented 3 years ago

This should be fixed, no? https://pypi.org/project/aiohttp/3.7.4.post0/#changelog

Yep. Confirmed its fixed.