Home > Mobile >  Docker check if container running is ARM or Intel
Docker check if container running is ARM or Intel

Time:05-22

Is there some way to check if a running image is ARM or Intel on Docker?

I am running the official Postgres docker image and I wondering if it is ARM or Intel

CodePudding user response:

You can inspect the image with docker image inspect $image_name and the following lines will be included in the output:

        "Architecture": "amd64",
        "Os": "linux",

Or you can format the inspect output:

$ docker image inspect busybox --format '{{ .Os }}/{{ .Architecture }}'
linux/amd64

This is metadata on the image, and doesn't guarantee that the binaries contained within haven't been compiled for a different architecture. On the same filesystem, you can have binaries compiled for lots of architectures (I do this all the time when cross compiling binaries to release for different architectures). Those binaries are what's really important when determining the platform. However, for a properly built image, that isn't an issue and the platform definition in the image is what you're looking for.

  • Related