Skip to content

Commit ce37c28

Browse files
committed
Added a workaround for Alpine Linux to avoid Python segfaults (docker-library/python#211)
1 parent 3703135 commit ce37c28

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

app/__init__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ def create_app(flask_config_name=None, **kwargs):
2121
"""
2222
Entry point to the Flask RESTful Server application.
2323
"""
24+
# This is a workaround for Alpine Linux (musl libc) quirk:
25+
# https://github.com/docker-library/python/issues/211
26+
import threading
27+
threading.stack_size(2*1024*1024)
28+
2429
app = Flask(__name__, **kwargs)
2530

2631
env_flask_config_name = os.getenv('FLASK_CONFIG')

0 commit comments

Comments
 (0)