ssh-keygen -t rsa -b 4096 # 生成 SSH 密钥
ssh-copy-id [email protected] # 复制公钥到 server2
services:
lsyncd:
image: baiy/lsyncd:1.0.0
environment:
# 目标服务器配置 user@ip:port:path 多个使用","分割
- SYNC_TARGETS=user@ip:port:path
# 忽略同步的文件或者路径 多个使用","分割 支持"*"通配符
- EXCLUDE_PATHS=*.log
volumes:
- ./data:/data/file
- ./logs:/data/logs
- ~/.ssh/id_rsa:/root/.ssh/id_rsa
Content type
Image
Digest
sha256:c427b2d3b…
Size
8.8 MB
Last updated
over 1 year ago
docker pull baiy/lsyncd