3 ms·
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
by vocram 6y ago
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?
- gmaster1440 6y agoYou 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/manifest_inspect/ https://docs.docker.com/engine/reference/commandline/manifes... [2] https://hub.docker.com/_/node https://hub.docker.com/_/node
- vocram 6y agoI 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
- LukeLambert 6y agoI'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