Skip to content

Instantly share code, notes, and snippets.

@takekazuomi
Created June 4, 2022 23:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save takekazuomi/40dc3ff5f3cc62d75947c417d107017f to your computer and use it in GitHub Desktop.
Save takekazuomi/40dc3ff5f3cc62d75947c417d107017f to your computer and use it in GitHub Desktop.

ラズパイでも動くよと聞いて、もしかしたらARMエミュかと思って中を見たら。 Multi-arch images になっていた。どっちを覗いても、ほぼほぼ同じようなものが入っている。

https://www.docker.com/blog/multi-arch-build-and-images-the-simple-way/

$ docker manifest inspect mcr.microsoft.com/azure-sql-edge:latest
{
   "schemaVersion": 2,
   "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
   "manifests": [
      {
         "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
         "size": 2423,
         "digest": "sha256:002736dcd150327093a8cb3423f849a41692a3c80db81d05c2d7e8ed5d37a1a5",
         "platform": {
            "architecture": "amd64",
            "os": "linux"
         }
      },
      {
         "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
         "size": 2634,
         "digest": "sha256:38a15031ae13bd50b03aeb94a4f486b4e87bd1cd462fa27d6273dccb5a20b4c5",
         "platform": {
            "architecture": "arm64",
            "os": "linux",
            "variant": "v8"
         }
      }
   ]
}
$

ラズパイ側は、ARM aarch64のバイナリ

mssql@8e9b664f06b4:/opt/mssql/bin$ file launchpadd
launchpadd: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, for GNU/Linux 3.7.0, BuildID[sha1]=b20076f3a65d1f1d01a894b5e59a74b151815ab7, not stripped
mssql@8e9b664f06b4:/opt/mssql/bin$ sha1sum launchpadd
b52c9a5cb1c69757ba192bc440de89f669479b80  launchpadd

wsl2側は、x64バイナリ、そしてハッシュも違う。

mssql@f56e6a494cf0:/opt/mssql/bin$ file launchpadd
launchpadd: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, BuildID[sha1]=a8cee4a452919ba712214630c2e074a87bd96291, with debug_info, not stripped
mssql@f56e6a494cf0:/opt/mssql/bin$ sha1sum launchpadd
4e90c065836dead0dbf71cc08718a735c159f712  launchpadd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment