Closed PGallace98 closed 1 year ago
@PGallace98
Thanks for your report
When you develop on M1 Mac, could you update the posgres image
to https://hub.docker.com/r/arm64v8/postgres/ which is Arm Docker images instead of default x86/amd64
Since I have no M1/M2 Mac in hand so I can not not test if it works, but I hope it can help.
Thx.
@michael-yin
Thank you for the reply.
Unfortunately updating to postgres arm image didn't fix the problem.
docker-compose.yml file for reference
@PGallace98
I did some research on this issue and figured it out
On apple silicon, we got Postgresql SCRAM authentication problem? so the program hang with "Waiting for PostgreSQL to become available" message.
We can use Rosetta to make our program work with "linux/amd64" instead of the "arm64"
Below are the steps:
And then run command below
# install rosetta
softwareupdate --install-rosetta
# tell docker to build and run on amd64 platform
export DOCKER_DEFAULT_PLATFORM=linux/amd64
docker-compose build
docker-compose up
I already tested it on real M1 Mac and it worked.
Thx
Thanks a lot it worked.
What happened?
I've followed the steps described on the e-book "Build Blog With Wagtail CMS (4.0.0)" on my M1 Mac and when Dockerizing the project (Chapter 4) I start encountering this issue.
The docker image and container build just fine but when I run the docker-compose logs -f command I encounter this issue
Additional details
I've followed the steps correctly, and the Dockerfile, the entrypoint, the start and the docker-compose.yml all match the book.
With the exact same configuration on my Windows 10 PC I don't encounter any problems at all.