本文详细介绍了Docker集装箱建造和运营的全过程。原文根据示例代码非常详细,对大家的学习培训或者工作有一定的参考价值,盆友一定要参考。
立即获取镜像系统,设置容器并运行容器a螺柱:
dockerrun-d--restart=always\ --privileged=true\ --net=host\ --name=fastdfs\ -eIP=192.168.149.128\ -eWEB_PORT=80\ -v${HOME}/fastdfs:/var/local/fdfsregistry.cn-beijing.aliyuncs.com/tianzuo/fastdfs其中-v${home}/fastdfs:/var/local/fdfs表示:
将文件目录${HOME}/fastdfs初始化到容器中的文件目录/var/local/fdfs中。
因此,提交的文档将被持久化到${HOME}/fastdfs/storage/data,
Ip后面是自己的网络服务器外网地址ip或者vm虚拟机IP,-eWEB_PORT=80具体nginx端口号。
浏览容器:
dockerexec-itfastdfs/bin/bash
向index.html文档添加文本信息。
echo“你好FastDFS!”>>index.html
提交此文档?
index.html上传
复制一条信息:
ThisisFastDFSclienttestprogramv5.12 Copyright(C)2008,HappyFish/YuQing FastDFSmaybecopiedonlyunderthetermsoftheGNUGeneral PublicLicenseV3,whichmaybefoundintheFastDFSsourcekit. PleasevisittheFastDFSHomePagehttp://www.csource.org/ formoredetail. [2020-08-1217:35:41]DEBUG-base_path=/var/local/fdfs/storage,connect_timeout=30,network_timeout=60,tracker_server_count=1,anti_steal_token=0,anti_steal_secret_keylength=0,use_connection_pool=0,g_connection_pool_max_idle_time=3600s,use_storage_id=0,storageserveridcount:0 tracker_query_storage_store_list_without_group: server1.group_name=,ip_addr=我的ip,port=23000 group_name=group1,ip_addr=我的ip,port=23000 storage_upload_by_filename group_name=group1,remote_filename=M00/00/00/rBEAB180KG2Ab6N2AAAAHhkaK9M13.html sourceipaddress:172.17.0.7 filetimestamp=2020-08-1217:35:41 filesize=30 filecrc32=421145555 examplefileurl:http://我的ip/group1/M00/00/00/rBEAB180KG2Ab6N2AAAAHhkaK9M13.html storage_upload_slave_by_filename group_name=group1,remote_filename=M00/00/00/rBEAB180KG2Ab6N2AAAAHhkaK9M13_big.html sourceipaddress:172.17.0.7 filetimestamp=2020-08-1217:35:41 filesize=30 filecrc32=421145555 examplefileurl:http://我的ip/group1/M00/00/00/rBEAB180KG2Ab6N2AAAAHhkaK9M13_big.html可以浏览到提醒形成的详细地址。
文章里的内容就这些了。期待对大家的学习和培训有所帮助,也期待大家的应用。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)