树莓派 运行docker

首先从官方的Docker Hub下载一个ubuntu的镜像
root@raspberrypi:/home# docker pull ubuntu
Using default tag: latest
latest: Pulling from library/ubuntu
d54efb8db41d: Pull complete
f8b845f45a87: Pull complete
e8db7bf7c39f: Pull complete
9654c40e9079: Pull complete
6d9ef359eaaa: Pull complete
Digest: sha256:dd7808d8792c9841d0b460122f1acf0a2dd1f56404f8d1e56298048885e45535
Status: Downloaded newer image for ubuntu:latest

查询一下下载的版本

root@raspberrypi:/home# docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
ubuntu              latest              0ef2e08ed3fa        3 weeks ago         130 MB

运行该版本

root@raspberrypi:/home/pi# docker run -it --rm ubuntu bash
standard_init_linux.go:178: exec user process caused "exec format error"

格式不对树莓派上无法执行ubuntu,查了一下资料需要rpi-raspbian的镜像

root@raspberrypi:/home/pi# docker search rpi-raspbian
NAME                                  DESCRIPTION                                     STARS     OFFICIAL   AUTOMATED
resin/rpi-raspbian                    Base image for the Raspberry Pi. Contains ...   266
sdhibit/rpi-raspbian                  Base raspbian image for ARM hard float boa...   48                   [OK]
hypriot/rpi-gogs-raspbian             Raspberry Pi compatible Docker Image with ...   19
jsurf/rpi-raspbian                    raspbian jessie base image with cross buil...   10                   [OK]
philipz/rpi-raspbian                                                                  3                    [OK]
mdsakalu/rpi-raspbian-ffmpeg          Rasbian with ffmpeg compiled for the Raspb...   3                    [OK]
sedden/rpi-raspbian-qemu              Raspberry Pi base image w/ qemu-arm-static      3
arthurmelo/rpi-raspbian               Raspbian base image built for armhf device...   1                    [OK]
gavrisco/rpi-raspbian                 RaspberryPi Raspbian image. With cross-com...   1                    [OK]
codingwell/rpi-raspbian-qemu          Raspbian tweaked to have qemu emulation ca...   1                    [OK]
kutsudock/rpi-raspbian                https://github.com/githubato/dockerfile-ra...   1
cseelye/rpi-raspbian-cross            Modified raspbian base image that allows a...   1                    [OK]
tmb28054/rpi-raspbian                 daily builds of resin/rpi-raspbian:latest ...   0
kuboon/rpi-raspbian-rbenv             I ♥️ ruby                                       0                    [OK]
abrahammouse/docker-rpi-raspbian      raspbian                                        0                    [OK]
royhooper/rpi-raspbian-qemu-python3   Raspberry Pi Raspbian image with qemu-base...   0                    [OK]
tgolson/rpi-raspbian-cross            `rpi-raspbian` base image configured for c...   0                    [OK]
lojzik/rpi-raspbian                                                                   0
chtison/rpi-raspbian                  RaspberryPi Docker Image Raspbian               0
jsurf/rpi-raspbian-build-essentials   Base package for building deb packages on ...   0                    [OK]
aducastel/rpi-raspbian                Raspbian minimal image                          0
archie2016/rpi-raspbian                                                               0
karlthegewgaw/rpi-raspbian-userland   Adds userland tools to resin/rpi-raspbian:...   0                    [OK]
peron/rpi-raspbian-wget               A RPi Raspbian image with wget preinstalle...   0
monsendag/rpi-raspbian-qemu           runs rpi-raspbian image on x86 Linux            0

取下评分最高的版本resin/rpi-raspbian运行

root@raspberrypi:/home/pi# docker run -it --rm resin/rpi-raspbian  bash
root@4215bf08fdfc:/# cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 8 (jessie)"
NAME="Raspbian GNU/Linux"
VERSION_ID="8"
VERSION="8 (jessie)"
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
root@4215bf08fdfc:/#

一切正常,可以在这个镜像上面进行修改

posted on 2017-04-05 22:01  arwen_spy  阅读(4045)  评论(0编辑  收藏  举报

导航