I'm a newbie to both macOS and Docker. I'm running into a series of roadblocks while trying to launch my project using Docker on Apple Silicon M2. I think that the issues i'm facing are related to bad compatibility between the image: webdevops/php-apache-dev:7.2 and the platform i'm using.
My docker-compose.yml looks like this:
version: "3"
services:
web:
image: webdevops/php-apache-dev:7.2
Also, i've changed it in some point to add:
version: "3"
services:
web:
platform:linux/amd64
image: webdevops/php-apache-dev:7.2
but keep getting errors.
I don't know what else to try. If you've got any insights or solutions to share, I'd greatly appreciate your guidance!
When I kick off docker-compose up, I'm greeted with an error message inside the my_project container that looks like this:
goroutine 1 [running]:
runtime.systemstack_switch()
/usr/local/Cellar/go/1.8.1/libexec/src/runtime/asm_amd64.s:281 fp=0xc420028788 sp=0xc420028780
runtime.main()
/usr/local/Cellar/go/1.8.1/libexec/src/runtime/proc.go:127 +0x6c fp=0xc4200287e0 sp=0xc420028788
runtime.goexit()
/usr/local/Cellar/go/1.8.1/libexec/src/runtime/asm_amd64.s:2197 +0x1 fp=0xc4200287e8 sp=0xc4200287e0
my_project exited with code 2
In my quest to troubleshoot, I tried adding the platform: linux/amd64 key to the web service in my docker-compose.yml file. However, this led to a different hurdle:
Error response from daemon: image with reference webdevops/php-apache-dev:7.2 was found but does not match the specified platform: wanted linux/arm64/v8, actual: linux/amd64
Switching gears, I experimented with changing the image to webdevops/php-apache-dev:7.4, but this led me to yet another error:
[+] Running 1/1
✘ web Error 20.2s
Error response from daemon: Get "https://registry-1.docker.io/v2/": proxyconnect tcp: dial tcp: lookup http.docker.internal on 192.168.65.7:53: read udp 192.168.0.1:49962->192.168.65.7:53: i/o timeout