【问题标题】:Docker on raspbian will not run containersraspbian 上的 Docker 不会运行容器
【发布时间】:2020-07-02 22:05:24
【问题描述】:

这是我的情况。我对任何不是 Windows 的操作系统都非常缺乏经验。我正在开发一个运行 Raspbian 的 Raspberry Pi Zero W,其最终目标是运行 zimdump,以便我可以编辑 .zim 文件。 tutorial 包括使用 Docker 将 .zim 文件挂载为卷并在容器中工作。我似乎安装了具有正确版本和架构的 Docker,但 docker run hello-world 没有按预期工作。从我第一次运行它时的日志:

Unable to find image ‘hello-world:latest‘ locally
latest: Pulling from library/hello-world
4ee5c797bcd7: Pull complete
Digest: sha256: [long sha256]
Status: Downloaded newer image for hello-world: latest

没有别的了。我第二次运行它,没有打印出来。第三次,我跑了

sudo docker run hello-world -it

打印的更详细

docker: Error response from daemon: OCI runtime failed: container_linux.go:349: starting container process caused “exec: \”-it\”: executable file not found in $PATH”: unknown.

我尝试了各种故障排除步骤,用户的情况仅与我的情况相关,但不完全相关,我不想在幕后更改任何其他让您和我更难的事情。 这是我的docker info

Client:
  Debug Mode: false

Server:
  Containers: 3
    Running: 0
    Paused: 0
    Stopped: 3
  Images: 1
  Server Version: 19.03.12
  Storage Driver: overlay2
    Backing Filesystem: extfs 
    Supports d_type: true
    Native Overlay Diff: true
  Logging Driver: json-file
  Cgroup Driver: cgroupfs
  Plugins:
    Volume: local
    Network: bridge host ipvlan macvlan null overlay
    Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog 
  Swarm: inactive
  Runtimes: runc 
  Init Binary: docker-init
  containerd version: 7ad184331fa3e55e52b890ea95e65ba581ae3429
  runc version: dc9208a3303feef5b3839f4323d9beb36df0a9dd
  init version: fec3683
  Security Options:
    seccomp 
      Profile: default
  Kernel Version: 4.19.66+
  Operating System: Raspbian GNU/Linux 10 (buster)
  OSType: Linux
  Architecture: armv6l
  CPUs: 1
  Total Memory: 424.8MiB
  Name: box.lan
  ID: DAJU:334L:G6WP:RARN:REWW:K2LE:CJUK:LCBJ:XDWH:ZX5D:4XRM:BCTM
  Docker Root Dir: /var/lib/docker
  Debug Mode: false
  Registry: https://index.docker.io/v1s/
  Labels:
  Experimental: false
  Insecure Registries:
    127.0.0.0/8
  Live Restore Enabled: false

WARNING: No swap limit support
WARNING: No cpu cfs quota support
WARNING: No cpu cfs period support
WARNING: No cpuset support

我已经为此花费了 8 个小时,我想做的只是从 .zim 中删除明确的维基百科页面,这样我们就可以将这个树莓派作为离线互联网提供给孩子们。

你们都是最棒的☺️

【问题讨论】:

  • 删除-it。试试看:docker run hello-world
  • -it 放在容器名称之前。所以它是docker run -ti hello-world
  • @kaylum 这仍然不打印 :( @KamilCuk docker run -it hello-world 打印 failed to resize tty, using default size,然后再添加一行空白。

标签: linux docker raspbian raspberry-pi-zero zim-database


【解决方案1】:

普通版的 hello-world Dock 映像无法在 Raspberry Pi 零上运行。因为树莓派零使用 ARMv6Z 指令集。代替docker run hello-world,您可以运行:

docker run --name someContainerName arm32v5/hello-world

请注意,此容器是使用 ARM32v5 指令集构建的。理论上,任何等于或低于 v6 的 ARM32 版本都应该在 Pi 零上工作。

我花了一整天的时间才弄明白。如果您想了解详细信息,我已经写了一篇blog post 来介绍如何让 Docker 在 Raspberry Pi 1 和 Zero 上工作。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-11-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多