1. Pull the image
docker pull registry.cn-beijing.aliyuncs.com/tianzuo/fastdfs
2. Create a mapping directory
mkdir -p /home/Data
mkdir -p /home/Html
Data is the fastdfs file upload directory
Html is the web page storage directory
3. Start the container
Here we need to modify the IP to the current server’s IP, and here we use the host’s network mode
basic image (the container will not virtualize its own network card, configure the host’s IP, etc., but use the host’s IP and port;
docker run -d --restart=always --privileged=true --net=host --name=fastdfs -e IP=192.168.1.1 -e WEB_PORT=80 -v /home/Data:/var/local/fdfs -v /home/Html:/usr/local/nginx/html registry.cn-beijing.aliyuncs.com/tianzuo/fastdfs