久久r热视频,国产午夜精品一区二区三区视频,亚洲精品自拍偷拍,欧美日韩精品二区

您的位置:首頁技術文章
文章詳情頁

Docker容器搭建并運行實現過程詳解

瀏覽:179日期:2024-11-19 08:11:16

直接拉取鏡像,創建容器并運行容器一把梭哈:

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

Docker容器搭建并運行實現過程詳解

其中-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.12Copyright (C) 2008, Happy Fish / YuQingFastDFS may be copied only under the terms of the GNU GeneralPublic 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: 0tracker_query_storage_store_list_without_group: server 1. group_name=, ip_addr=我的ip, port=23000group_name=group1, ip_addr=我的ip, port=23000storage_upload_by_filenamegroup_name=group1, remote_filename=M00/00/00/rBEAB180KG2Ab6N2AAAAHhkaK9M13.htmlsource ip address: 172.17.0.7file timestamp=2020-08-12 17:35:41file size=30file crc32=421145555example file url: http://我的ip/group1/M00/00/00/rBEAB180KG2Ab6N2AAAAHhkaK9M13.htmlstorage_upload_slave_by_filenamegroup_name=group1, remote_filename=M00/00/00/rBEAB180KG2Ab6N2AAAAHhkaK9M13_big.htmlsource ip address: 172.17.0.7file timestamp=2020-08-12 17:35:41file size=30file crc32=421145555example file url: http://我的ip/group1/M00/00/00/rBEAB180KG2Ab6N2AAAAHhkaK9M13_big.html

Docker容器搭建并運行實現過程詳解

根據提示生成的地址就可以訪問到了

以上就是本文的全部內容,希望對大家的學習有所幫助,也希望大家多多支持好吧啦網。

標簽: Docker
相關文章:
主站蜘蛛池模板: 大余县| 石景山区| 务川| 西乌珠穆沁旗| 扶风县| 汕尾市| 田林县| 马尔康县| 佛冈县| 寿光市| 绥化市| 克什克腾旗| 四川省| 祁东县| 东乌珠穆沁旗| 库尔勒市| 桐城市| 遵义市| 旬邑县| 安国市| 嵊州市| 绥阳县| 六盘水市| 景洪市| 抚宁县| 任丘市| 崇文区| 漠河县| 彰化市| 承德市| 新竹市| 阳泉市| 亚东县| 嘉黎县| 连江县| 哈巴河县| 临夏县| 内黄县| 松原市| 保定市| 民权县|