wp-local-docker-v2: M1 Macbook says it's running but can't access WP Homepage
UPDATE: This issue has been resolved through continues Docker updates and Great suggestions from other devs.
Hello, Im not sure if I should report this as a bug or not because I’m aware of the differences in architecture for the new Apple Silicon and that the available docker installation it’s currently a Preview and not official. However I decided to do so because I really enjoy 10updocker and hope other developers may find this useful.
Describe the bug
I have manage to successfully get all the containers in the 10updocker configuration running on the M1 macbook without modifying the docker-compose files. The installation logs state that the site has been successfully created and it adds the local domain to /etc/hosts file. But when try goin to the domain.test. the browser is unable to find the page. all of the containers are running, including phpmyadmin, nginx:latest, 10up/wp-php-fpm-dev, memcached, mysql, andyshinn/dnsmasq, mailcatcher. Im able to access phpmyadmin by going to 127.0.0.1:8092 and i can create/update databases. however for some reason the WP page isn’t available. i tried domain.test, 127.0.0.1 and nothing.
Steps to Reproduce
To reproduce these steps its a little involved. the Stock Big Sur/M1 configuration utilizes Port 53 for mDNSResponder for Bonjour. So if you try creating a 10updocker environment youll run into errors that port 53 is already in use. so you need to disable mDNSResponder by doing the following:
1. Disable System Integrity Protection (SIP) by starting your Mac in recovery mode, accessing the terminal and running
csutil disable
2. boot into your profile, start a terminal and type
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist
this will disable mDNSResponder and kill the current process BUT it will break access to your terminal’s internet connection. So you must re-enable it with sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist
3. Now that the mDNSResponder process is not running, make sure no other containers or brew services are running that use the same ports. then create a 10updocker environment with 10updocker create foo.test
and follow intallation steps.
- With the latest version of Docker for M1 (March Release Candidate), create a 10updocker environment with
10updocker create foo.test
and follow intallation steps - The installation will conclude and say its successful, giving you the domain to visit. running
docker ps
will display the active running containers. Expected behavior
when visiting the domain.test, the default WP homepage should appear. Screenshots
Environment information
- Device: M1 Macbook Air
- OS: Big Sur 11.2.3
- Browser and version: Brave, Firefox, Safari
- WordPress version: default install
Additional context
I dont recomment you disable System Integrity Protection or mDNSResponder for long periods of time. I just tested this to get 10updocker running on the default compose file since i kept getting errors when trying to create a wp environment.
reenable System Integrity Protection (SIP) entering recovery mode, accessing the terminal and running
As previosly stated, Not sure if i should report this or not. but the fact that 10updocker initializes all the containers with the default configuration and not be able to access the WP homepage is weird. Any comments or suggestions are welcomed.csutil enable
Im not sure why mDNSResponder needs to be taking up port 53 but i find it annoying.
UPDATE: I upgrade Docker to the latest Release for M1 macs and no longer have a port 53 error, all the containers start up However the issue of no being able to access the WP home page remains.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 16
I was able to get 10updocker running on my M1 Mac Mini today after the update to nginx-proxy went up. I want to recount the steps I took to get it running. This is not fully official but, if like me, you need your tools back… any port in a storm.
10updocker stop all
and make sure all docker containers that are part of wp-local-docker global servers are destroyed (checkdocker ps -a
).~/.wplocaldocker/global/docker-compose.yml
file and update the image entry for the gateway from10up/nginx-proxy
to10up/nginx-proxy:multiarch
image: mysql:5
toimage: mariadb
platform: linux/x86_64
under your mysql settings remove it.start
orcreate
an environmentNotes:
global_mysql_1
andglobal_gateway_1
container manually. After they are clear run10updocker stop all
and then attempt anotherstart
orcreate
@jeremiahbratton so the workaround for now seems to be (tested by others):
In
~/.wplocaldocker/global/docker-compose.yml: