-
-
Save aa65535/a48bc61dbf44184d480c88eab3fe9d74 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 定义配置目录, 根据需要修改 | |
CONF_DIR=/etc/xiaoya | |
mkdir -p $CONF_DIR | |
# 创建三个配置文件 | |
touch $CONF_DIR/mytoken.txt | |
touch $CONF_DIR/pikpak.txt | |
touch $CONF_DIR/guestpass.txt | |
# 启动容器 | |
docker run -d -p 5678:80 -p 5244:5244 -v $CONF_DIR:/data --restart=always --name=xiaoya xiaoyaliu/alist:latest | |
# 替换绑定地址为 0.0.0.0 | |
docker exec -it xiaoya sed -i 's/127.0.0.1/0.0.0.0/' /opt/alist/data/config.json | |
# 确认替换是否成功 | |
docker exec -it xiaoya cat /opt/alist/data/config.json | |
# 删除配置备份,防止修改被恢复,这里需要等到完全启动后再执行 | |
docker exec -it xiaoya rm -f /var/lib/data.zip | |
# 查看管理员帐号密码 | |
docker exec -it xiaoya ./alist admin | |
# 重启容器 | |
docker restart xiaoya |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
凉了,只能跑一个原版一个小雅,原版做套娃