prakhar1989/docker-curriculum

[Tutorial Documentation] - Note to build in in amd64 platform for users on Apple M1 chip

justinwang189 opened this issue · 2 comments

Perhaps worth noting in the tutorial where catnip gets built: docker build -t yourusername/catnip . that users using Apple Silicon hardware need to build on linux/amd64 platform. Otherwise when they deploy via Elastic Beanstalk it will fail. (in not the most obvious fashion)

Following the Docker Tutorial and having issues with WebApp tutorial and Apple M1:

  1. when running $ docker run --rm -it prakhar1989/static-site
  2. error message: Status: Downloaded newer image for prakhar1989/static-site:latest
    WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
    Nginx is running...
    2022/08/21 15:14:06 [emerg] 10#10: io_setup() failed (38: Function not implemented
  3. causes the terminal to become unresponsive

use docker build -t yourUsername/catnip . --platform linux/amd64 when you want to build it for AWS Beanstalk

use docker build -t yourUsername/catnip . --platform linux/arm64/v8 when you want to build it on your own local machine