Filemanager 是一款轻量级开源文件管理系统。可用于上传,删除,预览,重命名和编辑文件。它允许创建多个用户,每个用户可以拥有自己的目录。
[root@docker ~]# cat /etc/os-release
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"
CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"
[root@docker ~]# systemctl status docker
● docker.service - Docker Application Container Engine
Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled; vendor preset: disabled)
Active: active (running) since Fri 2022-10-21 13:52:55 CST; 39min ago
Docs: https://docs.docker.com
Main PID: 9813 (dockerd)
Tasks: 22
Memory: 110.5M
CGroup: /system.slice/docker.service
├─ 9813 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
├─13425 /usr/bin/docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 3000 -container-ip 172.20.0.2 -container-port 3...
└─13453 /usr/bin/docker-proxy -proto tcp -host-ip :: -host-port 3000 -container-ip 172.20.0.2 -container-port 3000
Oct 21 13:52:39 docker dockerd[9813]: time="2022-10-21T13:52:39.865036098+08:00" level=info msg="ccResolverWrapper: send...le=grpc
Oct 21 13:52:39 docker dockerd[9813]: time="2022-10-21T13:52:39.865044855+08:00" level=info msg="ClientConn switching ba...le=grpc
Oct 21 13:52:41 docker dockerd[9813]: time="2022-10-21T13:52:41.471511161+08:00" level=info msg="[graphdriver] using pri...erlay2"
Oct 21 13:52:45 docker dockerd[9813]: time="2022-10-21T13:52:45.234684184+08:00" level=info msg="Loading containers: start."
Oct 21 13:52:47 docker dockerd[9813]: time="2022-10-21T13:52:47.414394139+08:00" level=info msg="Default bridge (docker0...ddress"
Oct 21 13:52:54 docker dockerd[9813]: time="2022-10-21T13:52:54.698122310+08:00" level=info msg="Loading containers: done."
Oct 21 13:52:54 docker dockerd[9813]: time="2022-10-21T13:52:54.973240663+08:00" level=info msg="Docker daemon" commit=e...0.10.18
Oct 21 13:52:54 docker dockerd[9813]: time="2022-10-21T13:52:54.973328839+08:00" level=info msg="Daemon has completed in...zation"
Oct 21 13:52:55 docker systemd[1]: Started Docker Application Container Engine.
Oct 21 13:52:55 docker dockerd[9813]: time="2022-10-21T13:52:55.682450266+08:00" level=info msg="API listen on /var/run/...r.sock"
Hint: Some lines were ellipsized, use -l to show in full.
[root@docker ~]# docker info
Client:
Context: default
Debug Mode: false
Plugins:
app: Docker App (Docker Inc., v0.9.1-beta3)
buildx: Docker Buildx (Docker Inc., v0.8.2-docker)
compose: Docker Compose (Docker Inc., v2.6.0)
scan: Docker Scan (Docker Inc., v0.17.0)
Server:
Containers: 2
Running: 2
Paused: 0
Stopped: 0
Images: 3
Server Version: 20.10.17
Storage Driver: overlay2
Backing Filesystem: xfs
Supports d_type: true
Native Overlay Diff: true
userxattr: false
Logging Driver: json-file
Cgroup Driver: cgroupfs
Cgroup Version: 1
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive
Runtimes: io.containerd.runc.v2 io.containerd.runtime.v1.linux runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 10c12954828e7c7c9b6e0ea9b0c02b01407d3ae1
runc version: v1.1.2-0-ga916309
init version: de40ad0
Security Options:
seccomp
Profile: default
Kernel Version: 3.10.0-957.el7.x86_64
Operating System: CentOS Linux 7 (Core)
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 7.62GiB
Name: node
ID: EIOB:6IAO:NQTR:AJBA:O6KS:SNWP:JEDK:GXBG:55FP:IOSK:WRH3:QOAU
Docker Root Dir: /var/lib/docker
Debug Mode: false
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
127.0.0.0/8
Registry Mirrors:
https://sp4mg57h.mirror.aliyuncs.com/
Live Restore Enabled: false
WARNING: IPv4 forwarding is disabled
[root@docker ~]# echo "net.ipv4.ip_forward=1" >> /etc/sysctl.conf
[root@docker ~]# systemctl restart network
[root@docker ~]# sysctl net.ipv4.ip_forward
net.ipv4.ip_forward = 1
[root@docker ~]# docker -v
Docker version 20.10.17, build 100c701
curl -L https://get.daocloud.io/docker/compose/releases/download/1.25.0/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
[root@docker ~]# curl -L https://get.daocloud.io/docker/compose/releases/download/1.25.0/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 423 100 423 0 0 362 0 0:00:01 0:00:01 --:--:-- 362
100 16.2M 100 16.2M 0 0 8568k 0 0:00:01 0:00:01 --:--:-- 8568k
chmod +x /usr/local/bin/docker-compose
[root@docker ~]# docker-compose version
docker-compose version 1.25.0, build 0a186604
docker-py version: 4.1.0
CPython version: 3.7.4
OpenSSL version: OpenSSL 1.1.0l 10 Sep 2019
[root@docker ~]# docker pull smokserwis/filemanager
Using default tag: latest
latest: Pulling from smokserwis/filemanager
f49cf87b52c1: Pull complete
185616061386: Pull complete
5fc132db2e0d: Pull complete
00c1c323341a: Pull complete
ff3701349211: Pull complete
faab1d6ad70f: Pull complete
eae8d88d75e0: Pull complete
7fbd4c732645: Pull complete
b2e59bdd1208: Pull complete
dc295cd4163b: Pull complete
f20cf94ab013: Pull complete
2487c77e7431: Pull complete
cb2ac2ff3a32: Pull complete
91b8af3e62cb: Pull complete
bed3abc70e62: Pull complete
15834f4d9c5d: Pull complete
4f1122fc66de: Pull complete
60b7b339ab82: Pull complete
9166eab89063: Pull complete
42913d62f903: Pull complete
Digest: sha256:43b8f2c5bfad99b5c3790f13e61f8dc2e612b2bec24a2d875e6742bd6046bb74
Status: Downloaded newer image for smokserwis/filemanager:latest
docker.io/smokserwis/filemanager:latest
docker run -h example.com -v /your/files:/var/www/mount -p 80:80 smokserwis/filemanager
[root@docker filemanager]# cat docker-compose.yaml
version: '3.5'
services:
filemanager:
image: smokserwis/filemanager
restart: always
container_name: filemanager
volumes:
- /data/filemanager/files:/var/www/mount
ports:
- 8011:80
networks:
- files
networks:
files:
[root@docker filemanager]# docker-compose up -d
Creating network "filemanager_files" with the default driver
Creating filemanager ... done
[root@docker filemanager]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
b82aa51eeb11 smokserwis/filemanager "docker-php-entrypoi…" About a minute ago Up About a minute 0.0.0.0:8011->80/tcp, :::8011->80/tcp filemanager