查看可以看到storage、tracker两个已经启动起来了
[root@VM-8-7-centos logs]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
21c94b7f0547 delron/fastdfs "/usr/bin/start1.s..." 8 minutes ago Up 8 minutes storage
bc258c1b3dfd delron/fastdfs "/usr/bin/start1.s..." 8 minutes ago Up 8 minutes tracker
需要重新启动下
[root@VM-8-7-centos logs]# systemctl restart docker
重新查看下状态
[root@VM-8-7-centos logs]# docker status
进入容器查看storage:
[root@VM-8-7-centos logs]# docker exec -it storage /bin/bash
进入到cd /etc/fdfs下的storage.conf
[root@VM-8-7-centos fdfs]# cd /etc/fdfs[root@VM-8-7-centos fdfs]# pwd
/etc/fdfs
[root@VM-8-7-centos fdfs]# ll
total 88
-rw-rw-r-- 1 root root 1449 Jan 7 03:49 client.conf
-rw-r--r-- 1 root root 1461 Apr 29 2018 client.conf.sample
-rw-r--r-- 1 root root 955 Apr 29 2018 http.conf
-rw-r--r-- 1 root root 31172 Apr 29 2018 mime.types
-rw-r--r-- 1 root root 3677 Jan 7 03:49 mod_fastdfs.conf
-rw-rw-r-- 1 root root 7891 Jan 7 03:49 storage.conf
-rw-r--r-- 1 root root 7927 Apr 29 2018 storage.conf.sample
-rw-rw-r-- 1 root root 105 Apr 29 2018 storage_ids.conf
-rw-r--r-- 1 root root 105 Apr 29 2018 storage_ids.conf.sample
-rw-rw-r-- 1 root root 7307 Apr 29 2018 tracker.conf
-rw-r--r-- 1 root root 7389 Apr 29 2018 tracker.conf.sample
进入storage.conf
[root@VM-8-7-centos fdfs]# vi storage.conf
--------------------------以下是storage.conf文件--------------------------
# is this config file disabled# false for enabled# true for disabled# 这个是要新添加上去的,其他的不用动
http.server_port=8888
disabled=false
# the name of the group this storage server belongs to## comment or remove this item for fetching from tracker server,# in this case, use_storage_id must set to true in tracker.conf,# and storage_ids.conf must be configed correctly.
group_name=group1
# bind an address of this host# empty for bind all addresses of this host
bind_addr=# if bind an address of this host when connect to other servers# (this storage server as a client)# true for binding the address configed by above parameter: "bind_addr"# false for binding any address of this host
client_bind=true
......以下省略
--------------------------以上是storage.conf文件--------------------------