Skip to content

Python Alpine images not working on armv7 #637

Description

@David-Lor

Since the last few days, I've been experiencing that many (or maybe all) of the python alpine-based images do not work on armv7. Debian-based images seem to work fine, and the alpine-based images also work on amd64.

Here's some output where I try different tags and versions, of both Python and Alpine:

docker@pi:/home/opi$ docker run -it --rm python:3-alpine python                                                                                                                 [51/81]
Unable to find image 'python:3-alpine' locally                                                                                                                                        
3-alpine: Pulling from library/python         
4ee0caa23b36: Already exists   
fc2abd71660d: Already exists
6fb40097973e: Already exists                                            
d7296a96d484: Already exists                           
71f4aec5801c: Already exists                  
Digest: sha256:55fbe1ef2c62a1607ab702ac14111d9981d6b4f2a62351b75ffe34622f18dc3f
Status: Downloaded newer image for python:3-alpine         
Fatal Python error: init_interp_main: can't initialize time
Python runtime state: core initialized
PermissionError: [Errno 1] Operation not permitted
                                                                               
Current thread 0xb6fcb390 (most recent call first):        
<no Python frame>                        


               
docker@pi:/home/opi$ docker run -it --rm python:3-alpine3.13 python     
Unable to find image 'python:3-alpine3.13' locally     
3-alpine3.13: Pulling from library/python          
e160e00eb35d: Already exists
9ceaa6fd436a: Pull complete
e00d02274d62: Pull complete
8a2edf3b906b: Pull complete
09313ac9170b: Pull complete
Digest: sha256:379e453d41b5c25c6d5282ae30f16055ead6720f7f7cc8fd449fe5ded6705ed7
Status: Downloaded newer image for python:3-alpine3.13
Fatal Python error: init_interp_main: can't initialize time
Python runtime state: core initialized
PermissionError: [Errno 1] Operation not permitted

Current thread 0xb6fa6390 (most recent call first):
<no Python frame>



docker@pi:/home/opi$ docker run -it --rm python:3.8.11-alpine3.13 python
Unable to find image 'python:3.8.11-alpine3.13' locally
3.8.11-alpine3.13: Pulling from library/python
e160e00eb35d: Already exists
080a3da76c5a: Pull complete
293ff52afc61: Pull complete
99dd3fe08560: Pull complete
993c618bac52: Pull complete
Digest: sha256:5d8a7c8424ca2211dac2328026f82b8724333208db559f5d1e8c9cc2d5b0da7b
Status: Downloaded newer image for python:3.8.11-alpine3.13
Fatal Python error: pyinit_main: can't initialize time
Python runtime state: core initialized
PermissionError: [Errno 1] Operation not permitted

Current thread 0xb6f6b390 (most recent call first):
<no Python frame>



docker@pi:/home/opi$ docker run -it --rm python:3.7.11-alpine3.13 python                                                                                                         [2/81]
Unable to find image 'python:3.7.11-alpine3.13' locally
3.7.11-alpine3.13: Pulling from library/python
e160e00eb35d: Already exists
080a3da76c5a: Already exists
dac4002e3fd9: Pull complete
89b7785246be: Pull complete
f379a2aa6792: Pull complete
Digest: sha256:e069a92ba18adb18dc29baefb83b8574d0958464dc88abe58a2d4545542ec647
Status: Downloaded newer image for python:3.7.11-alpine3.13
Fatal Python error: _Py_InitializeMainInterpreter: can't initialize time
PermissionError: [Errno 1] Operation not permitted

Current thread 0xb6f49390 (most recent call first):



docker@pi:/home/opi$ docker run -it --rm python:3.6.14-alpine3.13 python
Unable to find image 'python:3.6.14-alpine3.13' locally
3.6.14-alpine3.13: Pulling from library/python
e160e00eb35d: Already exists
080a3da76c5a: Already exists
4a56a5cdf0e6: Pull complete
8d29f61fcd37: Pull complete
c35d713ebcc7: Pull complete
Digest: sha256:bb85ae8051cebf0b77897d190ba2424b7b805ce713ee55aeaa51e87be3efa245
Status: Downloaded newer image for python:3.6.14-alpine3.13
Fatal Python error: Py_Initialize: can't initialize time
PermissionError: [Errno 1] Operation not permitted

Current thread 0xb6f85390 (most recent call first):



# Debian-based images work fine:
docker@pi:/home/opi$ docker run -it --rm python:3.7.11-slim-buster python
Unable to find image 'python:3.7.11-slim-buster' locally
3.7.11-slim-buster: Pulling from library/python
13e3f03410ff: Already exists
f38a55d4e97c: Pull complete
4e7ff508b0a4: Pull complete
b9abd81c52b2: Pull complete
7aa4d4cbfceb: Pull complete
Digest: sha256:e3f5000fc331217f9c4e3c00a3fac14a1ce6126dc11901d88457f0cb5d8560e4
Status: Downloaded newer image for python:3.7.11-slim-buster
Python 3.7.11 (default, Aug 17 2021, 07:23:49)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>

System info:

root@pi:/home/opi# screenfetch -n
 docker@pi.lan
 OS: Debian 10 buster
 Kernel: armv7l Linux 5.10.34-sunxi
 Uptime: 65d 19m
 Packages: 479
 Shell: 7693
 CPU: ARMv7 rev 5 (v7l) @ 4x 1.368GHz [53.1°C]
 GPU: 
 RAM: 428MiB / 999MiB

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions