树莓派3b安装docker-engine

开始以为是很难的事情,因为在互联网上没有找到他人发布的简单上手的教程。一次,突发奇想,直接下载了离线安装包,没想到竟异常顺利,后来也有些小插曲也解决了,记录在此。

首先,查看自己rasp的系统版本,wheezy或者jessie之类,下载网址在这里

要下载对应的armhf的版本,比如我的系统是jessie,那么用的是docker-engine_17.05.0~ce-0~debian-jessie_armhf.deb

然后sudo dpkg -i *.deb

这里如果有相关依赖包,就根据提示下载安装。我这里竟然没有任何依赖。

然后docker -v 测试是否安装成功,没问题。

sudo docker run 'hello-world',这里出现问题了,

1
2
3
4
5
6
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
78445dd45222: Pull complete
Digest: sha256:c5515758d4c5e1e838e9cd307f6c6a0d620b5e07e6f927b07d05f6d12a1ac8d7
Status: Downloaded newer image for hello-world:latest
standard_init_linux.go:178: exec user process caused "exec format error"

按图索google,查到了这里,原来默认的hell-world镜像都是x86_64的,需要下载对应的armhf版本的镜像,

跳转到这里,提供了2个armhf版本镜像下载地址 https://hub.docker.com/u/armhf/,https://hub.docker.com/u/armv7/

例如sudo docker pull armhf/ubuntu,则成功拉取镜像到本地!