docker Permissiissuon denied issue

realpath(): Permission denied
System.UnauthorizedAccessException: Access to the path '/app' is denied

同样的操作,在另一台同样系统版本的机器上正常。

确认了需要link的volume 目录权限,没有问题。

因为是权限问题,所以怀疑是否是selinux的问题,对比了下,确实不一样,是开启的。

尝试去disable

然后就正常了

centos6 repo update for the yum issue

yum 安装时报错:

YumRepo Error: All mirror URLs are not using ftp, http[s] or file.YumRepo Error: All mirror URLs are not using ftp, http[s] or file.

centos6 repo源一键修复:

sed -i "s|enabled=1|enabled=0|g" /etc/yum/pluginconf.d/fastestmirror.conf
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
curl -o /etc/yum.repos.d/CentOS-Base.repo https://www.xmpan.com/Centos-6-Vault-Aliyun.repo 
yum clean all
yum makecache

千牛操作纪要

开通花呗付款:交易管理=》分期管理=》花呗
关闭聊天机器人:
1)店铺管理=》子账号管理=》分流设置=》设置=》店铺服务助手。一个bug式的存在是因为阿里总是把在线客服状态判断为离线,所以如果你开启了旺旺分流里面的“离线分流”,你将仍然收到自动回复。
2)禁用店小蜜中的自动接待和智能辅助

淘宝多客服自定义代码

其中xxx是子账号的URL编码,根据实际需要自己填写:

<div class="tb-module tshop-um tshop-um-kfzx">
    <div>
         
    </div>
    <div class="kefu190">
        <div class="hd"></div>
        <div class="bd">
            <div class="one">
                <h3 style="border-bottom:1px solid #D8D8D8;" > 售前客服</h3>
                <ul>
                    <li style="width:145px;line-height:35px;overflow:hidden;" class="item item0">
                         <a target="_blank" href="http://amos.alicdn.com/getcid.aw?v=2&uid=xxx&site=cntaobao&s=1&groupid=0&charset=utf-8">
<img border="0" src="http://amos.alicdn.com/online.aw?v=2&uid=%E6%9E%81%E9%80%9F%E7%89%A9%E8%81%94%3A%E5%BC%A0%E5%85%88%E7%94%9F&site=cntaobao&s=1&charset=utf-8" alt="给我发消息" /></a> <b style="margin-top:5px;width:30px;height:15px;right:3px;top:1px;"> AAA </b>
                    </li>
                </ul>
            </div>
            <div class="one">
                <h3 style="border-bottom:1px solid #D8D8D8;"> 售后客服</h3>
                <ul>
                    <li style="width:145px;line-height:35px;overflow:hidden;" class="item item0">
                         <a target="_blank" href="http://amos.alicdn.com/getcid.aw?v=2&uid=xxx&site=cntaobao&s=1&groupid=0&charset=utf-8">
<img border="0" src="http://amos.alicdn.com/online.aw?v=2&uid=%E6%9E%81%E9%80%9F%E7%89%A9%E8%81%94%3A%E8%82%96%E5%85%88%E7%94%9F&site=cntaobao&s=1&charset=utf-8" alt="给我发消息" /></a> <b style="margin-top:5px;width:30px;height:15px;right:3px;top:1px;"> BBB </b>
                    </li>
                </ul>
            </div>
            <div class="onez" style="padding-bottom:5px;padding-left:0px;margin-left:0px;width:100%;">
                <ul>
                    <h3 style="border-top:1px solid #D8D8D8;border-bottom:none;margin-bottom:0px;padding-top:8px;width:100%;"> 工作时间:9:00-18:00</h3>
                    <li style="height:46px;margin:0;padding-top:5px;width:100%;color:#888;background:none;line-height:23px;text-align:center;">
                         周日和法定节假日休息
                        <p style="color:#888;">只接单不发货</p>
                    </li>
                </ul>
            </div>
        </div>
    </div>
</div>

certbot renew errors

certbot renew时,突然出错:

ImportError: cannot import name UnrewindableBodyError

尝试安装更新:

pip install requests urllib3 pyOpenSSL --force --upgrade

安装后,依然有错:

pkg_resources.DistributionNotFound: The 'urllib3<1.23,>=1.21.1' distribution was not found and is required by requests

从提示看是urllib3版本不满足要求导致的问题,尝试安装最新版:

pip install urllib3
Looking in indexes: http://mirrors.aliyun.com/pypi/simple/
Requirement already satisfied: urllib3 in /usr/local/lib/python3.9/site-packages (1.21.1)

安装完最新的1.21.1 错误提示依然,说明还需要处理路径的问题。

首先需要找到的是目前到底是哪个版本,哪个路径?

find / -name "urllib3-*"
/usr/lib/python2.7/site-packages/urllib3-1.10.2-py2.7.egg-info
/usr/local/lib/python3.6/site-packages/urllib3-1.23-py3.6.egg
/usr/local/lib/python3.6/site-packages/urllib3-1.21.1-py3.6.egg
/usr/local/lib/python3.6/site-packages/urllib3-1.25.11.dist-info
/usr/local/lib/python3.9/site-packages/urllib3-1.21.1.dist-info

从上面的后缀看基本都是大于1.21的,那么当前系统索引的应该就是 urllib3-1.10.2 这个版本了。

解决

问题分析清楚了,解决就很简单了。
将前面安装时提示的最新的1.21.1对应的相关文件 手动拷贝到 1.10.2 对应的路径就好了。
分别拷贝 urllib3 和 urllib3-1.21.1.dist-info 两个目录

再去测试 certbot renew, 一切恢复正常

unraid中使用docker安装Lychee荔枝相册

管理自己的私人照片,目前的选择是群晖的moments,偶然看到荔枝相册Lychee的效果,觉得做公开图片管理很合适,所以准备学习下。

github

https://github.com/LycheeOrg/Lychee
https://github.com/LycheeOrg/Lychee-Docker

准备工作

在宝塔中创建需要的数据库lychee。

docker安装

docker run -d --name lychee --link=baota -p 50003:80 --restart always -e DB_CONNECTION=mysql -e DB_HOST=baota -e DB_DATABASE=lychee -e DB_USERNAME=lychee -e DB_PASSWORD=xxx --network=myNetwork --ip 172.18.0.203 -v /mnt/user/appdata/lychee/conf:/conf -v /mnt/user/appdata/lychee/uploads:/uploads  -v /mnt/user/appdata/lychee/sym:/sym linuxserver/lychee

安装完,系统初始化要等一会儿,然后按照设置的端口登录。
第一次要设置帐户密码,然后就可以使用了。

版本更新

4.2.2发现有升级的问题,解决办法就是删了image重新装,因为数据都在本地和数据库,所以更新后数据没问题。