[Docker + Pi] File Browser - More Convenient File Management

‘X3Pi’ supports’ Docker ‘, but we haven’t seen anything about it in the community. This introduction uses’ Docker ‘to deploy a simple file management service and enrich the small application of’ X3Pi ’

Docker environment configuration

Install Docker

Use ‘apt’ to install ‘docker.io’ directly

sudo apt install docker.io docker-compose -y

Configure the Docker environment

  1. Create the Docker Daemon configuration file

    sudo touch /etc/docker/daemon.json

  2. Modify the file to add a mirror source

    sudo vim /etc/docker/daemon.json

  3. Content written to the file

    {
    “registry-mirrors” : [
    https://registry.docker-cn.com”,
    https://docker.mirrors.ustc.edu.cn”,
    https://mirror.ccs.tencentyun.com
    ]
    }

  4. Reload daemon and restart docker

    sudo systemctl restart docker
    sudo systemctl daemon-reload

  5. Check whether the source switchover is successful

    sudo doker info

#!/bin/bash
[ ! -e database.db ] && touch database.db 

sudo docker run \
    -v ~:/srv \
    -v $(pwd)/database.db:/database.db \
    -u $(id -u):$(id -g) \
    -p 8080:80 \
    --restart=always \
    filebrowser/filebrowser