portainer(2):在raspberryPi 3b+上面安装docker 和 portainer 的 agent

前言


本文的原文连接是: https://blog.csdn.net/freewebsys/article/details/81665552
未经博主允许不得转载。
博主地址是:http://blog.csdn.net/freewebsys

1,关于raspberryPi


默认的是安装的优化了的debian系统。是经过优化过的arm debian系统。
要找到上面的源,然后在更新。
本来以为用默认的docker 就可以,但是发现跑不了,和ubuntu上面的源还是不太一样。

2,使用


可以使用apt 安装,但是不是最新的。比较老。而且不能用。

sudo apt install docker.io
pi@raspberrypi:~ $ sudo 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

直接从官网上面的方法安装最新的:

pi@raspberrypi:~ $ sudo curl -sSL https://get.docker.com | sh
# Executing docker install script, commit: 6bf300318ebaab958c4adc341a8c7bb9f3a54a1a
+ sudo -E sh -c apt-get update -qq >/dev/null
+ sudo -E sh -c apt-get install -y -qq apt-transport-https ca-certificates curl >/dev/null
+ sudo -E sh -c curl -fsSL "https://download.docker.com/linux/raspbian/gpg" | apt-key add -qq - >/dev/null
Warning: apt-key output should not be parsed (stdout is not a terminal)
+ sudo -E sh -c echo "deb [arch=armhf] https://download.docker.com/linux/raspbian stretch stable" > /etc/apt/sources.list.d/docker.list
+ sudo -E sh -c apt-get update -qq >/dev/null
+ [ -n  ]
+ sudo -E sh -c apt-get install -y -qq --no-install-recommends docker-ce >/dev/null
+ sudo -E sh -c docker version
Client: Docker Engine - Community
 Version:           19.03.2
 API version:       1.40
 Go version:        go1.12.8
 Git commit:        6a30dfc
 Built:             Thu Aug 29 06:18:10 2019
 OS/Arch:           linux/arm
 Experimental:      false

Server: Docker Engine - Community
 Engine:
  Version:          19.03.2
  API version:      1.40 (minimum version 1.12)
  Go version:       go1.12.8
  Git commit:       6a30dfc
  Built:            Thu Aug 29 06:12:07 2019
  OS/Arch:          linux/arm
  Experimental:     false
 containerd:
  Version:          1.2.6
  GitCommit:        894b81a4b802e4eb2a91d1ce216b8817763c29fb
 runc:
  Version:          1.0.0-rc8
  GitCommit:        425e105d5a03fabd737a126ad93d62a9eeede87f
 docker-init:
  Version:          0.18.0
  GitCommit:        fec3683
If you would like to use Docker as a non-root user, you should now consider
adding your user to the "docker" group with something like:

  sudo usermod -aG docker pi

Remember that you will have to log out and back in for this to take effect!

WARNING: Adding a user to the "docker" group will grant the ability to run
         containers which can be used to obtain root privileges on the
         docker host.
         Refer to https://docs.docker.com/engine/security/security/#docker-daemon-attack-surface
         for more information.

然后使用 portainer 注册和之前的一样。
https://blog.csdn.net/freewebsys/article/details/100717108

需要注意的是,并不是所有的镜像都有arm版本的比如 mariadb 就没有。

sudo docker pull mariadb
Using default tag: latest
latest: Pulling from library/mariadb
no matching manifest for linux/arm/v7 in the manifest list entries

3,总结


发现raspberrypi 上面的docker 也都是一样的。然后通过docker 进行软件的安装也是一样的。
前提是要有arm版本的。镜像。

本文的原文连接是:
https://blog.csdn.net/freewebsys/article/details/81665552

博主地址是:http://blog.csdn.net/freewebsys

发布了624 篇原创文章 · 获赞 259 · 访问量 208万+

猜你喜欢

转载自blog.csdn.net/freewebsys/article/details/100822201