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

推荐订阅源

爱范儿
爱范儿
博客园_首页
W
WeLiveSecurity
S
Secure Thoughts
S
Security @ Cisco Blogs
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Hugging Face - Blog
Hugging Face - Blog
www.infosecurity-magazine.com
www.infosecurity-magazine.com
H
Hacker News: Front Page
Project Zero
Project Zero
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
U
Unit 42
N
News and Events Feed by Topic
N
News and Events Feed by Topic
Hacker News - Newest:
Hacker News - Newest: "LLM"
Forbes - Security
Forbes - Security
T
Tor Project blog
I
Intezer
B
Blog
F
Full Disclosure
Security Archives - TechRepublic
Security Archives - TechRepublic
F
Fortinet All Blogs
Schneier on Security
Schneier on Security
T
Threat Research - Cisco Blogs
AI
AI
Google DeepMind News
Google DeepMind News
L
LINUX DO - 最新话题
Cloudbric
Cloudbric
L
Lohrmann on Cybersecurity
WordPress大学
WordPress大学
博客园 - 聂微东
雷峰网
雷峰网
P
Privacy International News Feed
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
PCI Perspectives
PCI Perspectives
Y
Y Combinator Blog
Spread Privacy
Spread Privacy
Simon Willison's Weblog
Simon Willison's Weblog
罗磊的独立博客
Vercel News
Vercel News
A
Arctic Wolf
The Register - Security
The Register - Security
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Microsoft Azure Blog
Microsoft Azure Blog
H
Heimdal Security Blog
Know Your Adversary
Know Your Adversary
P
Proofpoint News Feed
C
Cybersecurity and Infrastructure Security Agency CISA
P
Proofpoint 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 产生的脏数据导致的。做事情还是不能心急。