So I quickly gave this a go and the docker build command finished as expected:
Output
tom@ember:~/n8n-python$ docker build -t n8n-python .
Sending build context to Docker daemon 2.048kB
Step 1/4 : FROM n8nio/n8n
---> 9da9bd45e3e9
Step 2/4 : RUN apk add --update python3 py3-pip
---> Running in 1a33d6d74764
fetch http://dl-cdn.alpinelinux.org/alpine/v3.11/main/aarch64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.11/community/aarch64/APKINDEX.tar.gz
(1/7) Installing libffi (3.2.1-r6)
(2/7) Installing gdbm (1.13-r1)
(3/7) Installing ncurses-terminfo-base (6.1_p20200118-r4)
(4/7) Installing ncurses-libs (6.1_p20200118-r4)
(5/7) Installing readline (8.0.1-r0)
(6/7) Installing sqlite-libs (3.30.1-r2)
(7/7) Installing python3 (3.8.10-r0)
Executing busybox-1.31.1-r9.trigger
OK: 104 MiB in 44 packages
Removing intermediate container 1a33d6d74764
---> 026aae4095c8
Step 3/4 : RUN python3 -m pip install requests
---> Running in 4541de98075f
Collecting requests
Downloading requests-2.27.1-py2.py3-none-any.whl (63 kB)
Collecting idna<4,>=2.5
Downloading idna-3.3-py3-none-any.whl (61 kB)
Collecting certifi>=2017.4.17
Downloading certifi-2021.10.8-py2.py3-none-any.whl (149 kB)
Collecting urllib3<1.27,>=1.21.1
Downloading urllib3-1.26.8-py2.py3-none-any.whl (138 kB)
Collecting charset-normalizer~=2.0.0
Downloading charset_normalizer-2.0.12-py3-none-any.whl (39 kB)
Installing collected packages: urllib3, idna, charset-normalizer, certifi, requests
Successfully installed certifi-2021.10.8 charset-normalizer-2.0.12 idna-3.3 requests-2.27.1 urllib3-1.26.8
WARNING: Running pip as root will break packages and permissions. You should install packages reliably by using venv: https://pip.pypa.io/warnings/venv
WARNING: You are using pip version 21.1.1; however, version 22.0.4 is available.
You should consider upgrading via the '/usr/bin/python3 -m pip install --upgrade pip' command.
Removing intermediate container 4541de98075f
---> 9e30ba676437
Step 4/4 : RUN python3 -m pip install --upgrade pip
---> Running in e1057477e9c7
Requirement already satisfied: pip in /usr/lib/python3.8/site-packages (21.1.1)
Collecting pip
Downloading pip-22.0.4-py3-none-any.whl (2.1 MB)
Installing collected packages: pip
Attempting uninstall: pip
Found existing installation: pip 21.1.1
Uninstalling pip-21.1.1:
Successfully uninstalled pip-21.1.1
Successfully installed pip-22.0.4
WARNING: Running pip as root will break packages and permissions. You should install packages reliably by using venv: https://pip.pypa.io/warnings/venv
Removing intermediate container e1057477e9c7
---> fa34438fea8b
Successfully built fa34438fea8b
Successfully tagged n8n-python:latest
Seeing the part that fails seems to be the 3069625232:error:0D0D90AD:asn1 encoding routines:ASN1_TIME_adj:error getting time:crypto/asn1/a_time.c:330:, are you perhaps using a 32 bit CPU or OS? You’d be affected by this problem then:
Unfortunately, this isn’t something the Alpine team can fix from the sounds of it:
I suppose there is nothing we can fix in the alpine image, so I close this issue.
Perhaps you can consider switching to a 64 bit OS?
Very strange. It should actually be possible. Our n8n default image is Alpine based, also installs Python, and gets also built for “linux/arm/v7”, which if I understand it correctly is 32bit.
Interesting, I ran uname -m in the terminal which gave me armv7l which is a 32 bit OS. I believe RPi 4 is able to run 64 bit OS so I’ll try it out. Any specific operating system you would recommend?
Additionally, the last time I built n8n-python successfully was about 3 weeks ago.