我看到了this,从这里我可以下载docker daemon
和docker client
的有效的arm64版本。
$ ls | xargs file
containerd: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), statically linked, for GNU/Linux 3.7.0, Go BuildID=qw3vidR0_xw6ad6RsQMc/1Mvy0xkskqC4LJM8ekEq/jvzo407uWVjZxA71fYmB/r1PXwIjd2b3xjPt0tOPD, BuildID[sha1]=f8a87e57a37d283060789f7b6b967f35c30d1385, stripped
containerd-shim: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), statically linked, Go BuildID=-FbKcwS7GH0h3bDWjYhL/LdkbOXrZDB7bUI5hVare/0n0703v40o5qYAvXmWf7/2_QBPVlcfCHqgmApuCcj, stripped
ctr: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), statically linked, for GNU/Linux 3.7.0, Go BuildID=wcFfUczubU9WzSMgMHbV/9qJT0yqeUUvOvoLwk2rL/UJPlPmjhWvWQSGM0BjUq/nz-x_U4rhoAErNC5UKvE, BuildID[sha1]=e7fe6b82894b6bf6c70a2427481f879a5c342cbd, stripped
docker: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), statically linked, Go BuildID=kGbyf6df_lIBsP2zN-aw/mSkNZi8-n573BH3qCxiL/S_qDX39Bbfl6h9BHKaHC/quZgsL-4q_5_Xu6VnCVI, not stripped
dockerd: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), statically linked, for GNU/Linux 3.7.0, Go BuildID=W3bAmk2RFppITPWcS_4m/ODbBAFymPAKdThBEapBo/FEH4KbWqvMFNQhWUKSp1/QA_f4aqjz6iKiFCV3joT, BuildID[sha1]=96792f1bae1750c4b9fc949c8988694b7378b80e, with debug_info, not stripped
docker-init: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), statically linked, for GNU/Linux 3.7.0, BuildID[sha1]=dd417538230515ff4846537c0332512632db5bd2, stripped
docker-proxy: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), statically linked, Go BuildID=e1uObKFCO2MCzLXoZ4ij/IWuhN_VlndZn0XCvmPYQ/SqEk5FGxOKYjp8b-3-WP/Y_RNFD3JSDFXbk_neaAl, with debug_info, not stripped
runc: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), statically linked, for GNU/Linux 3.7.0, Go BuildID=QhVg0N-9Q2OEb5Lj-BN1/HxEuk0yZiGKQguwkToc9/EBT3VcPRTQwVA_0eTS1l/sXiMljveurc6-0yOOwdh, BuildID[sha1]=209a7edb91edbd565b7f90f0c57bc11ba29ea9a9, with debug_info, not stripped
然后,我想知道上面的二进制文件是如何产生的,我看到this,这是一篇很好的文章,我成功地使用make static DOCKER_BUILD_PKGS=static-linux
和源{{3}为x86-64构建了二进制文件}
但是,我需要使用arm版本,所以我尝试了下2种方法:
make static DOCKER_BUILD_PKGS="static-linux cross-arm"
GOOS=linux GOARCH=arm64 make static DOCKER_BUILD_PKGS=static-linux
以上两种方法都可以构建docker client
版本的arm
,但是docker daemon
仍然是x86-64
版本,请参见下一个:
orange@orange:~/docker-ce/components/packaging/static/build/linux/docker$ ls | xargs file
containerd: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), statically linked, for GNU/Linux 2.6.32, BuildID[sha1]=b3373a479eb94f19270cd9db5b27c149dfc58b9c, stripped
containerd-shim: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, stripped
ctr: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), statically linked, for GNU/Linux 2.6.32, BuildID[sha1]=78dba144a5f3d9c4f1d6588e4d96b8dc84531860, stripped
docker: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), statically linked, not stripped
dockerd: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), statically linked, for GNU/Linux 2.6.32, BuildID[sha1]=bc15506d7c7e9cf25a854ef6296940821769949a, not stripped
docker-init: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), statically linked, for GNU/Linux 2.6.32, BuildID[sha1]=935ade6a155bf37269208cfb807f9d6653f34020, stripped
docker-proxy: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, not stripped
runc: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), statically linked, for GNU/Linux 2.6.32, BuildID[sha1]=14523b67ee2ca600894e06729f8606f5a7d0e227, not stripped
那么,我在做错什么,如何获得dockerd的arm版本?
答案 0 :(得分:1)
从源代码中,我们可以看到cross-arm选项仅对客户端起作用。
尝试在像ec2这样的ARM64 VM上构建。