mathjazz / pontoon

In-place localization tool
https://pontoon.mozilla.org/
BSD 3-Clause "New" or "Revised" License
3 stars 1 forks source link

Pontoon build fails in Docker on M1 MacBooks due to segfault in curl #1311

Open mathjazz opened 3 years ago

mathjazz commented 3 years ago

This issue was created automatically by a script.

Bug 1720875

Bug Reporter: @eemeli CC: @mathjazz

The issue is mentioned in the Docker Desktop release notes:

On Apple Silicon in native arm64 containers, older versions of libssl in debian:buster, ubuntu:20.04 and centos:8 will segfault when connected to some TLS servers, for example curl https://dl.yarnpkg.com. The bug is fixed in newer versions of libssl in debian:bullseye, ubuntu:21.04 and fedora:35.

The Pontoon Docker image uses python:3.8-buster as a base, and apparantely all current python images are themselves based on buster images.

As a workaround, forcing the platform to linux/amd64 appears to allow the build to succeed, as it's then emulated:

--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -5,6 +5,7 @@ version: "2"
 services:
   # Webapp
   webapp:
+    platform: linux/amd64
     build:
       context: .
       dockerfile: ./docker/Dockerfile
mathjazz commented 3 years ago

Comment Author: GitHub Bugzilla PR Linker <pulgasaur@mozilla.bugs>

Created attachment 9231626 Link to GitHub pull-request: https://github.com/mozilla/pontoon/pull/1973

Attached file: file_691649859.txt (text/x-github-pull-request, 44 bytes) Description: Link to GitHub pull-request: https://github.com/mozilla/pontoon/pull/1973

mathjazz commented 3 years ago

Comment Author: GitHub Bugzilla PR Linker <pulgasaur@mozilla.bugs>

Created attachment 9239343 Link to GitHub pull-request: https://github.com/mozilla/pontoon/pull/2008

Attached file: file_726709919.txt (text/x-github-pull-request, 44 bytes) Description: Link to GitHub pull-request: https://github.com/mozilla/pontoon/pull/2008