How to build a Docker image for an Arm architecture on a Mac?

I’m trying to figure out how to use Docker’s new beta on my Mac to build an image for a different architecture. Specifically I’m trying to build for Raspberry Pi which uses an Arm processor.

Any ideas?

  • dotnet core web api CI/CD pipeline with docker container
  • How do I enable monitoring and logging for my containers on Bluemix?
  • What is the easiest method to copy files and directories in dockerfile
  • Using load testing app in docker
  • Adding custom settings into boot2docker profile
  • Docker compose and REST config
  • akka cluster nodes behind NAT (using docker)
  • Traefik : Let's Encrypt + other certificate
  • Remote selenium on Docker does not handle Javascript correctly
  • Deploying with docker push is slow because there are many images
  • PHPUnit testing FAILS ONLY when visiting the root page( visit('/') ) in Laravel 5
  • PHP development environment with docker (and how to use composer)
  • One Solution collect form web for “How to build a Docker image for an Arm architecture on a Mac?”

    You need to set the GOOS, GOARCH and GOARM environment variables before you build your application:

    export GOOS=linux
    export GOARCH=arm
    export GOARM=6
    go build -o bin/yourapp_arm_6
    

    see: Go environment variables

    Depending on your Raspberry Pi version you must set the GOARM version to 5, 6 or 7.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.