Hacker News new | ask | show | jobs
by gmaster1440 2009 days ago
I've tried one of the preview builds as part of their Developer Preview Program[1] and it's super fast when you're running an arm64 image, as opposed to an amd64 that will automatically be run via qemu (and therefore incur some overhead). By "super fast", I mean I was seeing speeds comparable to running the commands natively on the M1 mac (npm install and a heavy Gulp build).

[1] - https://www.docker.com/community/get-involved/developer-prev...

2 comments

How close are we to be able to deploy arm64 images to production/AWS/GCP?
You can deploy to AWS Graviton machines.
You can have done this for about 2 years.
Seems like GCP isn't offering this currently. It's available on AWS EC2: https://aws.amazon.com/ec2/graviton/
Are users able to check if they are running a native arm64 container image, as opposed to an amd64 emulated one?

Or that’s something you have to infer from the execution speed?

You can use manifest inspect[1] to see all supported architectures, and you should also be able to see on Docker Hub[2] as well.

EDIT: If you're asking specifically if you can tell what architecture a running container is using, a simple `docker inspect CONTAINER_ID` should show it.

[1] https://docs.docker.com/engine/reference/commandline/manifes... [2] https://hub.docker.com/_/node

I just checked myself, and you get notified with a nice WARNING upon a `docker run`:

    WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
I'm not great at bash, but this little script worked for me.

    #!/usr/bin/env bash
    docker ps --format "{{.ID}} {{.Names}}" | while read line; do
      read -ra arr <<<"$line"
      id="${arr[0]}"
      names="${arr[1]}"
      arch="$(docker exec "$id" uname -m)"
      echo -e "$arch\t$names"
    done
Or this one-liner with worse formatting:

    docker ps --format "{{.Names}}" | xargs -tI {} docker exec {} uname -m