Skip to content

Docker 安装 RustFS

Docker 官方安装文档:https://docs.rustfs.com.cn/installation/docker/index.html

Docker Hub:https://hub.docker.com/r/rustfs/rustfs/tags

安装部署

shell
docker pull rustfs/rustfs:1.0.0-beta.4

docker run -d \
  --name rustfs \
  -p 9000:9000 \
  -p 9001:9001 \
  -e RUSTFS_SERVER_DOMAINS=example.com \
  -e RUSTFS_ACCESS_KEY=rustfsadmin \
  -e RUSTFS_SECRET_KEY=rustfsadmin \
  -e RUSTFS_CONSOLE_ENABLE=true \
  -v /opt/rustfs/data:/data \
  rustfs/rustfs:1.0.0-beta.4 \
  /data

-p 9000:9000:映射宿主机 9000 Endpoint端口到容器 -p 9001:9001:映射宿主机 9001 Console 端口到容器

启用 Webdav

Pull Request: https://github.com/rustfs/rustfs/pull/2158

启用 Webdav 可增加如下参数并增加端口映射:

shell
  -p 8080:8080 \
  -e RUSTFS_WEBDAV_ENABLE=true \
  -e RUSTFS_WEBDAV_ADDRESS=0.0.0.0:8080 \
  -e RUSTFS_WEBDAV_TLS_ENABLED=false \

开启 webdav 的完整启动命令:

shell
docker run -d \
  --name rustfs \
  -p 9000:9000 \
  -p 9001:9001 \
  -p 8080:8080 \
  -e RUSTFS_SERVER_DOMAINS=example.com \
  -e RUSTFS_ACCESS_KEY=admin \
  -e RUSTFS_SECRET_KEY=1qaz2wsx \
  -e RUSTFS_CONSOLE_ENABLE=true \
  -e RUSTFS_WEBDAV_ENABLE=true \
  -e RUSTFS_WEBDAV_ADDRESS=0.0.0.0:8080 \
  -e RUSTFS_WEBDAV_TLS_ENABLED=false \
  -v /opt/rustfs/data:/data \
  rustfs/rustfs:1.0.0-beta.4 \
  /data

Windows 映射网络位置连接 webdav

打开文件管理器,在空白处右键单机,选择【添加一个网络位置】,填写 webdav 的地址:http://域名:端口、用户名、密码

然后在文件管理器中就多了一个网络文件夹。