大旗谷资源网 Design By www.zqyou.com
直接拉取镜像,创建容器并运行容器一把梭哈:
docker run -d --restart=always --privileged=true --net=host --name=fastdfs -e IP=192.168.149.128 -e WEB_PORT=80 -v ${HOME}/fastdfs:/var/local/fdfs registry.cn-beijing.aliyuncs.com/tianzuo/fastdfs
其中-v ${HOME}/fastdfs:/var/local/fdfs是指:
将${HOME}/fastdfs这个目录挂载到容器里的/var/local/fdfs这个目录里。
所以上传的文件将被持久化到${HOME}/fastdfs/storage/data里,
IP 后面是自己的服务器公网ip或者虚拟机ip,-e WEB_PORT=80 指定nginx端口
访问容器:
docker exec -it fastdfs /bin/bash
追加文本信息到index.html文件中
echo "Hello FastDFS!"index.html
上传此文件?
fdfs_test /etc/fdfs/client.conf upload index.html
打印了一段信息:
This is FastDFS client test program v5.12 Copyright (C) 2008, Happy Fish / YuQing FastDFS may be copied only under the terms of the GNU General Public License V3, which may be found in the FastDFS source kit. Please visit the FastDFS Home Page http://www.csource.org/ for more detail. [2020-08-12 17: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_key length=0, use_connection_pool=0, g_connection_pool_max_idle_time=3600s, use_storage_id=0, storage server id count: 0 tracker_query_storage_store_list_without_group: server 1. 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 source ip address: 172.17.0.7 file timestamp=2020-08-12 17:35:41 file size=30 file crc32=421145555 example file url: http://我的ip/group1/M00/00/00/rBEAB180KG2Ab6N2AAAAHhkaK9M13.html storage_upload_slave_by_filename group_name=group1, remote_filename=M00/00/00/rBEAB180KG2Ab6N2AAAAHhkaK9M13_big.html source ip address: 172.17.0.7 file timestamp=2020-08-12 17:35:41 file size=30 file crc32=421145555 example file url: http://我的ip/group1/M00/00/00/rBEAB180KG2Ab6N2AAAAHhkaK9M13_big.html
根据提示生成的地址就可以访问到了
以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持。
标签:
Docker,容器,搭建,运行
大旗谷资源网 Design By www.zqyou.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
大旗谷资源网 Design By www.zqyou.com
暂无Docker容器搭建并运行实现过程详解的评论...
更新日志
2024年10月18日
2024年10月18日
- 群星《歌手2024 第4期》[FLAC/分轨][563.76MB]
- RiffKitten-ChaosParade(2024)[24-44,1]FLAC
- RuneKlakegg-Nattevandrer(2024)[24-96]\FLAC
- 赖冰霞.2006-金嗓典藏辑2IN1(南方金点系列)2CD【南方】【WAV+CUE】
- 群星.1988-国语金曲尽精英VOL.2【瑞成】【WAV+CUE】
- 张宇.1999-雨一直下【EMI百代】【WAV+CUE】
- 袁娅维.2021-月亮失眠了(DELUXE)【华纳】【FLAC分轨】
- AlanBroadbent-JazzFunk(2024)[24-44,1]
- 梅艳芳《绝代芳华》开盘母带[低速原抓WAV+CUE]
- ABC唱片-《外国精逊母带直刻神奇黑胶[APE+CUE].
- 群星《天赐的声音第五季 第6期》[320K/MP3][101.43MB]
- 群星《天赐的声音第五季 第6期》[FLAC/分轨][526.16MB]
- 群星《说唱梦工厂 第2期》[320K/MP3][96.37MB]
- 杨宗宪.1994-留你留袂着【有容唱片】【WAV+CUE】
- 李翊君.2005-勇敢的爱【创意唱片】【WAV+CUE】