laravel / sail

Docker files for running a basic Laravel application.
https://laravel.com/docs/sail
MIT License
1.66k stars 475 forks source link

curl crashes on using libssl on M1 macs #167

Closed ahoiroman closed 3 years ago

ahoiroman commented 3 years ago

Description:

In my Laravel application I'd like to perform a curl-request, which is not successful, as the process is triggering a segfault.

Calling the raw curl statement inside the container like this

sail@6b159f978899:/var/www/html$ curl -u test@zammad.com:test123 'https://my-app.com/api/v1/users/search?query=smith&limit=10&expand=true'
Segmentation fault

It fails with segfault.

Performing a little web search, I found the reason:

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.

(https://docs.docker.com/docker-for-mac/release-notes/)

Is it possible to update to 21.04?

driesvints commented 3 years ago

We can't upgrade to 21.04 because Forge is still using 20.04. Please see https://github.com/laravel/sail/issues/159 and downgrade Docker as this is a bug in Docker itself.