Docker安装Portainer,NextCloud

 
 

安装docker

以ubuntu为例

sudo apt-get install docker.io

设置开机自启动

sudo systemctl enable docker

安装Portainer

portainer是一个docker的web管理界面,类似的还有DockerUI,Shipyard。如果不想每次都去控制台输命令的话,最好安装一个。

拉取镜像

sudo docker pull portainer/portainer

创建容器

创建容器,绑定9000端口,然后用浏览器打开。初次登陆注册用户,然后选择local连接到本地的docker。

docker run -d -p 9000:9000 --restart=always -v /var/run/docker.sock:/var/run/docker.sock --name portainer portainer/portainer

安装Nextcloud

在镜像里面搜索nextcloud然后下载。

创建容器

转到portainer的容器界面,添加容器,然后设置端口和持久卷。nextcloud容器数据的路径是/var/www/html,设置完毕然后deploy container,打开网页登录nextcloud。

/var/www/html Main folder, needed for updating
/var/www/html/custom_apps installed / modified apps
/var/www/html/config local configuration
/var/www/html/data the actual data of your Nextcloud
/var/www/html/themes/<you_custom_theme> theming/branding

Windows 10 映射WebDav

nextcloud支持webdav,可以在windows中映射为网络驱动器。要使用这个功能,需要两个操作。

让Window支持http访问webdav,将注册表HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WebClient\Parameters下面的键值BasicAuthLevel改为2,然后重启webclient服务

然后映射网络驱动器,但是要注意路径。官方文档的说明上面给的路径是https://example.com/nextcloud/remote.php/dav/files/USERNAME/ ,注意路径中的nextcloud是nextcloud的路径,使用docker直接装应该没有的,例如

http://127.0.0.1/remote.php/dav/files/zhangsan

而且,后面可以继续跟文件夹的,如果网盘存在这个目录的话

http://127.0.0.1/remote.php/dav/files/zhangsan/Documents

另外,用这个地址http://example.com/remote.php/webdav/也可以连接上的

http://127.0.0.1/remote.php/webdav/
http://127.0.0.1/remote.php/webdav/Documents
screenshot of mapping WebDAV on Windows Explorer
官方文档的图

猜你喜欢

转载自www.cnblogs.com/haisong1991/p/11408542.html