惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

酷 壳 – CoolShell
酷 壳 – CoolShell
T
Threatpost
Latest news
Latest news
N
News | PayPal Newsroom
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Help Net Security
Help Net Security
D
Darknet – Hacking Tools, Hacker News & Cyber Security
AI
AI
Simon Willison's Weblog
Simon Willison's Weblog
TaoSecurity Blog
TaoSecurity Blog
The Last Watchdog
The Last Watchdog
L
LINUX DO - 热门话题
Google DeepMind News
Google DeepMind News
T
Threat Research - Cisco Blogs
O
OpenAI News
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
T
The Exploit Database - CXSecurity.com
NISL@THU
NISL@THU
Application and Cybersecurity Blog
Application and Cybersecurity Blog
S
Securelist
小众软件
小众软件
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Martin Fowler
Martin Fowler
S
SegmentFault 最新的问题
Cisco Talos Blog
Cisco Talos Blog
云风的 BLOG
云风的 BLOG
AWS News Blog
AWS News Blog
GbyAI
GbyAI
N
News and Events Feed by Topic
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
美团技术团队
Engineering at Meta
Engineering at Meta
A
About on SuperTechFans
博客园 - 三生石上(FineUI控件)
S
Schneier on Security
博客园 - 聂微东
V2EX - 技术
V2EX - 技术
T
Troy Hunt's Blog
SecWiki News
SecWiki News
S
Secure Thoughts
B
Blog RSS Feed
Hugging Face - Blog
Hugging Face - Blog
WordPress大学
WordPress大学
腾讯CDC
H
Heimdal Security Blog
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Apple Machine Learning Research
Apple Machine Learning Research
月光博客
月光博客
www.infosecurity-magazine.com
www.infosecurity-magazine.com
P
Privacy International News Feed

博客园 - AuOK?

深夜发文,惨痛教训,在redis集群中,不能使用 multi SVN 同一个仓库下,不同目录的自动更新方法 写点正则表达式的 MySQL 事务嵌套的方法 go mod PHP笔记 NGINXConfig windows 下修改文件属性值 nextcloud 应用开发 记录一下搞nextcloud的辛酸事吧 nextcloud环境搭建及部署 docker容器内访问宿主机,访问不通 错误:Host is unreachable 记录一下SQL的行行比较 记录一次nginx平滑升级 letsencrypt免费SSL证书自动续期 守护进程因echo挂掉的原因,以及重定向标准输入、标准输出和标准错误 openresty lua-nginx-module模块中文文档 记录一下,php正则获取字符串子串技巧 nginx localhost的坑
docker-compose 记录一个让人抓狂的错误
AuOK? · 2023-05-05 · via 博客园 - AuOK?

执行一个包含多个service的docker-compose.yml的时候,出现以下错误:

strconv.Atoi: parsing "": invalid syntax

看字面上的意思,很明显就是yml文件有语法问题。

在多次修改无果后,百度了这个问题,终于找到了能够解决的办法。

docker-compose down --remove-orphans

使用上面命令删除一些未知有问题的容器,就能够解决上面的问题。

事后,仔细想想,在第一次执行docker-compose up -d的时候就未能正常执行完成,疯狂Ctrl+C,产生了一些有问题的容器,但是docker-compose down删除不掉。

同样一个场景下,遇到一个mysql的service,无法启动容器,报如下错误:

Cannot create redo log files because data files are corrupt or the database was not shut down cleanly after creating the data files.

因为docker-compose.yml文件里,定义了volume ,在volume里产生了一些数据,然后在下一次up的时候,导致把错误的文件挂载进容器内,产生上面的错误。最后删除mysql的volume ,重新up就解决了。

这两个问题的原因可能还是因为在第一次up的时候,等待过久疯狂Ctrl+C 产生的脏数据导致的。做事情还是不能心急。