openmediavault installation and configuration docker and portainer

This article mainly introduces the process of installing and configuring docker and portainer in openmediavault. portainer is a docker image.

1. Environment

  • Device:
    nanopi-m2v4
  • 系统:
    Armbian 21.02.3 Buster with Linux 4.4.213-rk3399
    Distributor ID: Debian
    Description: Debian GNU/Linux 10 (buster)
    Release: 10
    Codename: buster
  • omv version:
    5.6.4-1 (Usul)

2. Install docker

Enter 系统- OMV-Extras, install docker, most of which cannot be successful here, and need to be installed on the command line.
insert image description here
Refer to Tsinghua University Open Source Software Mirroring Station-Docker Community Edition image usage help
If you have installed docker in the past, delete it first:

sudo apt-get remove docker docker-engine docker.io

First install dependencies:

sudo apt-get install apt-transport-https ca-certificates curl gnupg2 software-properties-common

Depending on your distribution, what follows varies. The distribution I am using is Debian.
Trust Docker's GPG public key:

curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -

Pay attention to add the software warehouse according to the hardware architecture, mine is the arm architecture.
Add software repository:

echo "deb [arch=armhf] https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/debian \
     $(lsb_release -cs) stable" | \
    sudo tee /etc/apt/sources.list.d/docker.list

Finally install:

sudo apt-get update
sudo apt-get install docker-ce

Modify the domestic source:
edit or create a new configuration file /etc/docker/daemon.json, remember to add dns, and the reasons for adding dns refer to: ①The /etc/resolv.conf in the Docker container is inconsistent with the host machine, several ways to configure dns; ②Docker container to modify dns;

{
    
    
    "registry-mirrors": ["https://registry.docker-cn.com"],
    "dns" : ["114.114.114.114","8.8.8.8"]
}

3. Install Portainer

Step 2 After the installation, start to install portainer. It cannot be installed directly through omv-extras, but according to my situation, after adding dns analysis, enter omv-extras and click install directly.
You can first test whether the problem encountered is the same as mine, and then decide whether to follow the next operation.
Command line run:

docker search portainer

If the output is:

Error response from daemon: Get "https://index.docker.io/v1/search?q=portainer&n=25": dial tcp: lookup index.docker.io: device or resource busy
或
Error response from daemon: Get "https://index.docker.io/v1/search?q=portainer&n=25": dial tcp: lookup index.docker.io: no such host

Just /etc/resolv.confadd dns resolution at the end of the file:

nameserver 127.0.0.1
nameserver 114.114.114.114
nameserver 8.8.8.8

Then run again:

docker search portainer

The output is:

NAME                                        DESCRIPTION                                     STARS     OFFICIAL   AUTOMATED
portainer/portainer                         This Repo is now deprecated, use portainer/p…   2192                 
portainer/portainer-ce                      Portainer CE - a lightweight service deliver…   1053                 
portainer/agent                             An agent used to manage all the resources in…   142                  
portainer/templates                         App Templates for Portainer http://portainer…   24                   
portainer/portainer-ee                      Portainer BE - a fully featured service deli…   16                   
portainer/portainer-k8s-beta                Portainer for Kubernetes BETA                   5                    
portainer/golang-builder                    Utility to build Golang binaries.               5                    [OK]
portainer/volume-browser                    Experimental app used to browser the content…   4                    
portainer/dev-toolkit                       The entire Portainer development stack insid…   2                    
portainer/base                              Multi-stage build image to create the Portai…   2                    [OK]
portainer/authenticator                     Helps you use the Docker CLI with the Portai…   1                    
rancher/portainer-agent                                                                     1                    
portainer/gosec                                                                             1                    
portainer/helper-reset-password                                                             1                    
portainer/agent-k8s-beta                    Portainer for Kubernetes BETA (agent)           1                    
portainer/docbuilder                        Portainer.io documentation builder              1                    
portainer/portable-env                                                                      0                    
portainer/integration-starter                                                               0                    
portainer/pri-fidoiot                       Docker images for the FIDO Device Onboard (F…   0                    
portainer/helper-templates                  A container helper for template file operati…   0                    
portainer/angular-builder                   Builder image for Portainer frontend.           0                    [OK]
portainer/kubectl-shell                                                                     0                    
portainer/kube-tools                        Image including Docker, kubectl and kind        0                    
portainer/portainer-docker-extension                                                        0                    
portainer/open-amt-cloud-toolkit-postgres                                                   0                    

Then the modification takes effect. Next, go directly to 系统- OMV-Extrasto install portainer.
insert image description here

Guess you like

Origin blog.csdn.net/weixin_41474364/article/details/123554677