docker update修改容器配置


[root@localhost ~]# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
1fb916fb0e13 6a "sh" 2 hours ago Created hello2
9fb1ff8de577 6a "sh" 2 hours ago Up 7 minutes hello
[root@localhost ~]# docker start 1
1
[root@localhost ~]# docker stats
CONTAINER CPU % MEM USAGE / LIMIT MEM % NET I/O BLOCK I/O PIDS
9fb1ff8de577 0.00% 56KiB / 993MiB 0.01% 648B / 0B 0B / 0B 0
^C
[root@localhost ~]# docker update -m 500m --memory-swap -1 9f
9f
[root@localhost ~]# docker stats
CONTAINER CPU % MEM USAGE / LIMIT MEM % NET I/O BLOCK I/O PIDS
9fb1ff8de577 0.00% 56KiB / 500MiB 0.01% 648B / 0B 0B / 0B 0
CONTAINER CPU % MEM USAGE / LIMIT MEM % NET I/O BLOCK I/O PIDS
9fb1ff8de577 0.00% 56KiB / 500MiB 0.01% 648B / 0B 0B / 0B 0
CONTAINER CPU % MEM USAGE / LIMIT MEM % NET I/O BLOCK I/O PIDS
9fb1ff8de577 0.00% 56KiB / 500MiB 0.01% 648B / 0B 0B / 0B 0
CONTAINER CPU % MEM USAGE / LIMIT MEM % NET I/O BLOCK I/O PIDS
9fb1ff8de577 0.00% 56KiB / 500MiB 0.01% 648B / 0B 0B / 0B 0


————————————————
版权声明:本文为CSDN博主「chengqiuming」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/chengqiuming/article/details/78987167

上一篇:PostgreSQL 源码编译安装


下一篇:docker-compose 启动报错 caused: not a directory: unknown: Are you trying to mount a directory onto a fil