shopware / development

MIT License
189 stars 170 forks source link

Add ARM support for app_server image #183

Open Clex1o1 opened 2 years ago

Clex1o1 commented 2 years ago

PHP Version

7.4

Shopware Version

6.4

Expected behaviour

Running shopware locally with docker on my M1 Mac.

Actual behaviour

While staring the docker setup on Mac with M1 (ARM) processor the app_server container stops immediately with this error message:

-> Executing /opt/docker/provision/entrypoint.d/05-permissions.sh
-> Executing /opt/docker/provision/entrypoint.d/20-apache.sh
runtime: failed to create new OS thread (have 2 already; errno=22)
fatal error: newosproc

runtime stack:
runtime.throw(0x6430dc, 0x9)
    /usr/local/Cellar/go/1.8.1/libexec/src/runtime/panic.go:596 +0x95
runtime.newosproc(0xc42002a000, 0xc42003a000)
    /usr/local/Cellar/go/1.8.1/libexec/src/runtime/os_linux.go:163 +0x18c
runtime.newm(0x650dd0, 0x0)
    /usr/local/Cellar/go/1.8.1/libexec/src/runtime/proc.go:1628 +0x137
runtime.main.func1()
    /usr/local/Cellar/go/1.8.1/libexec/src/runtime/proc.go:126 +0x36
runtime.systemstack(0x75bb00)
    /usr/local/Cellar/go/1.8.1/libexec/src/runtime/asm_amd64.s:327 +0x79
runtime.mstart()
    /usr/local/Cellar/go/1.8.1/libexec/src/runtime/proc.go:1132

goroutine 1 [running]:
runtime.systemstack_switch()
    /usr/local/Cellar/go/1.8.1/libexec/src/runtime/asm_amd64.s:281 fp=0xc420026788 sp=0xc420026780
runtime.main()
    /usr/local/Cellar/go/1.8.1/libexec/src/runtime/proc.go:127 +0x6c fp=0xc4200267e0 sp=0xc420026788
runtime.goexit()
    /usr/local/Cellar/go/1.8.1/libexec/src/runtime/asm_amd64.s:2197 +0x1 fp=0xc4200267e8 sp=0xc4200267e0

After some research it seems it is an error with the container architecture of this image: webdevops/php-apache. I tried to add platform: linux/amd64 in the docker-compose.yml and docker-compose.override.yml. Also tried to add FROM --platform=linux/amd64 ${IMAGE_PHP}:${IMAGE_PHP_VERSION} in the dockerfile for the app container. But this is not working.

How to reproduce

On MacOS with M1 or newer processors the ./psh.phar docker:start command runs success fully but the app_server container stops always.

alxshell commented 2 years ago

Hi guys... is there a fix on the way? There is also a duplicate #179 open since april. Maybe you could at least provide a quickfix? That would be great. Thx.