代码之家  ›  专栏  ›  技术社区  ›  Trevor Sullivan

在Raspberry Pi 3 B上拖动arm32v7 Docker容器图像+

  •  0
  • Trevor Sullivan  · 技术社区  · 6 年前

    我有一个树莓皮3 B+与Docker安装在它。我正在尝试获取最新的ARMv7版本的golang容器图像,链接如下。

    docker pull 命令,我得到下面的一般错误。

    pi@trevorpi:~ $ docker pull arm32v7/golang:latest
    Pulling repository docker.io/arm32v7/golang
    Tag latest not found in repository docker.io/arm32v7/golang
    

    pi@trevorpi:~ $ docker version
    Client:
     Version:      1.8.3
     API version:  1.20
     Go version:   go1.4.3
     Git commit:   f4bf5c7
     Built:
     OS/Arch:      linux/arm
    
    Server:
     Version:      1.8.3
     API version:  1.20
     Go version:   go1.4.3
     Git commit:   f4bf5c7
     Built:
     OS/Arch:      linux/arm
    

    这是来自 uname -a

    Linux trevorpi 4.14.71-v7+ #1145 SMP Fri Sep 21 15:38:35 BST 2018 armv7l GNU/Linux
    

    显然,golang的x86 Docker映像不起作用,因为它与ARM不兼容。我可以拉取映像,但由于处理器架构的原因,它无法运行:

    pi@trevorpi:~ $ docker pull golang:latest
    latest: Pulling from library/golang
    
    836de16dcbe9: Already exists
    490028bf21ec: Already exists
    b9aece5a7acf: Already exists
    e5bf67252042: Already exists
    a221240e1da3: Already exists
    efcf11bc5c78: Already exists
    32d2d4bbdbd3: Already exists
    599e9bccee8b: Already exists
    b77bfa353366: Already exists
    dc799d5ef217: Already exists
    cb12e793d3e1: Already exists
    c984412a4f12: Already exists
    Digest: sha256:ce05c9f8151cc4ff3ce508509720597d103b630aa024bcfb012107149abfa361
    Status: Image is up to date for golang:latest
    pi@trevorpi:~ $ docker run --rm -it golang
    WARNING: Your kernel does not support memory swappiness capabilities, memory swappiness discarded.
    exec format error
    Error response from daemon: Cannot start container 0c04cb7f7192f2059b029637bd6306c0a4ff83299e3a20df920b3ea56339ab7a: [8] System error: exec format error
    

    问题 latest

    1 回复  |  直到 6 年前
        1
  •  0
  •   Raoslaw Szamszur    6 年前

    $ docker manifest inspect -v arm32v7/golang:latest
    [
        {
            "Ref": "docker.io/arm32v7/golang:latest@sha256:faf19ab885f9d0779bbbd615eee610c5aedfdd203ac5fceefbd5fc8afd73a2ac",
            "Descriptor": {
                "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
                "digest": "sha256:faf19ab885f9d0779bbbd615eee610c5aedfdd203ac5fceefbd5fc8afd73a2ac",
                "size": 1795,
                "platform": {
                    "architecture": "arm",
                    "os": "linux",
                    "variant": "v7"
                }
    

    你确定你的raspberry使用ARMV7架构吗?不幸的是,我自己没有覆盆子,所以我不能重现这个问题。 Golang repo

    可以尝试使用golang的官方存储库:

    docker pull golang:latest
    

    它们还支持您的体系结构:

    支持的体系结构:md64、arm32v6、arm32v7、arm64v8、, i386,ppc64le,s390x,windows-amd6