PrestaShop / docker

🐳
https://hub.docker.com/r/prestashop/prestashop/
MIT License
257 stars 176 forks source link

signal Segmentation fault on macOS M2 #357

Open fmineo opened 7 months ago

fmineo commented 7 months ago

Hi I'm using Docker 4.25.2 on macOS Sonoma 14.1.2.

I created a simple docker-compose.yml file:

version: "3"

services:

  mysql:
    image: mysql/mysql-server:5.7
    platform: linux/amd64
    restart: always
    environment:
      - MYSQL_RANDOM_ROOT_PASSWORD=1
      - MYSQL_USER=username
      - MYSQL_PASSWORD=password
      - MYSQL_DATABASE=prestashop
    networks:
      - ps

  phpmyadmin:
    image: phpmyadmin/phpmyadmin:latest
    platform: linux/amd64
    restart: always
    environment:
      PMA_HOST: mysql
      PMA_USER: username
      PMA_PASSWORD: password
    ports:
      - "10001:80"
    networks:
      - ps

  prestashop_latest:
    platform: linux/amd64
    image: prestashop/prestashop:latest
    depends_on:
      - mysql
    ports:
      - 80:80
    volumes:
      - .:/var/www/html/modules/my_module
    environment:
      - DB_SERVER=mysql
      - DB_PREFIX=ps_
      - PS_INSTALL_AUTO=1
      - DB_USER=username
      - DB_PASSWD=password
      - DB_NAME=prestashop
      - PS_FOLDER_ADMIN=PSAdmin
      - PS_DOMAIN=localhost
      - PS_LANGUAGE=it
      - PS_COUNTRY=it
      - PS_FOLDER_INSTALL=installed
    networks:
      - ps

networks:
  ps:
    driver: bridge

Then I run

docker compose up -d --build

Everything goes fine, until I visit localhost and get ERR_EMPTY_RESPONSE error.

If I look at the container logs I see the following message:

[core:notice] [pid 1] AH00052: child pid 20 exit signal Segmentation fault (11)

I found a workaround to run without issues:

In Docker go to Settings -> General, choose osxfs (Legacy) as file sharing implementation and uncheck the Use Virtualization Framework checkbox. Apply & restart. This will work without issues

Gerardlc commented 5 months ago

It happens to me everytime I update docker or MacOs, turning off "Use Rosetta for x86/amd64 emulation on Apple Silicon" option of docker fixs it for me

TheoAlloin commented 4 months ago

Ty @Gerardlc , it saved my day 👍