其他分享
首页 > 其他分享> > 使用 Docker 镜像安装 Radicale3

使用 Docker 镜像安装 Radicale3

作者:互联网

安装 Docker 环境 :下载 Radicale 镜像

docker pull cnkmmk/radicale:3.0.6-r0

配置文件的准备

一共3个配置文件,config, users, rights
users 为用户帐号记录,我使用的是MD5,生成可以直接使用 htpasswd 在线工具 https://tool.oschina.net/htpasswd,一个用户一行,格式为:username:password

mkdir -p /home/radicale/{etc,collections}

echo 'username:$apr1$OcPL.lFw$KBVFjrNTksW0exp5TeKjj.' > /home/radicale/etc/users

cat << EOF > /home/radicale/etc/config
[server]
hosts = 0.0.0.0:5232

[encoding]
request = utf-8
stock = utf-8

[auth]
type = htpasswd
htpasswd_filename = /etc/radicale/users
htpasswd_encryption = md5

[rights]
type = from_file
file = /etc/radicale/rights

[storage]
filesystem_folder = /var/lib/radicale/collections
EOF

cat << EOF > /home/radicale/etc/rights
[root]
user: .+
collection:
permissions: R

[principal]
user: .+
collection: {user}
permissions: RW

[calendars]
user: .+
collection: {user}/[^/]+
permissions: rw
EOF

启动容器

docker run -itd --name Radicale -v /home/radicale/etc:/etc/radicale -v /home/radicale/collections:/var/lib/radicale/collections -p 5232:5232 --restart=always  cnkmmk/radicale:3.0.6-r0

 

 



标签:radicale,Radicale3,etc,htpasswd,collections,user,镜像,home,Docker
来源: https://www.cnblogs.com/zhanqing/p/16142316.html