当前位置:网站首页>Memory limit should be smaller than already set memoryswap limit, update the memoryswap at the same
Memory limit should be smaller than already set memoryswap limit, update the memoryswap at the same
2022-08-04 05:33:00 【上海_运维_Q先生】
1. 报错现象
报错信息:
Memory limit should be smaller than already set memoryswap limit,
update the memoryswap at the same time
当对容器执行docker update时发生报错
[email protected]:~# docker update --memory 300m prod_v1
Error response from daemon: Cannot update container 3554652f8b3ce79bcacbb6042a249f9e7d10154d500eb2a2feb9baf91862b00d: Memory limit should be smaller than already set memoryswap limit, update the memoryswap at the same time
2. 解决方法1
docker update --memory 300m --memory-swap -1 prod_v1

3. 解决方法2
重建容器,在创建时指定–memory,之后再扩展就不会报错了
新建容器
docker run -it -d --name container4 --memory 256m nginx
扩展容器
docker update --memory 512m container4

边栏推荐
猜你喜欢
随机推荐
IDEA创建Servlet步骤
罗斯50分
枚举和联合(自定义类型)-C语言
网络安全行业是蓝景吗?
淘宝分布式文件系统存储引擎(一)
基于Webrtc和Janus的多人视频会议系统开发4 - 改造信令交互系统完成sdp交换过程
Unity Day02
如何在网页标题栏中加入图片!
【HIT-SC-MEMO6】哈工大2022软件构造 复习笔记6
Uos统信系统控制台欢迎登陆后消息及所处区域配置
EL expression
0--100的能被3整出的数的集合打乱顺序
安装Apache服务时出现的几个问题, AH00369,AH00526,AH00072....
[Daily office][shell] Common code snippets
2022在 Go (Golang) 中使用微服务的系统课程
vim的介绍
JUC并发容器——阻塞队列
使用JS在浏览器中打印菱形
指针的运算【C语言】
第九篇 ApplicationContext初始化









