[Feature] Container-Edit-Restart Rules Can Not Rebuild the Container #8663
sunzhonghui
started this conversation in
Ideas
Replies: 3 comments
-
如需修改以上配置,还是需要删除原容器并重新创建的。 root@ubuntu:~# docker container update --help
Usage: docker container update [OPTIONS] CONTAINER [CONTAINER...]
Update configuration of one or more containers
Aliases:
docker container update, docker update
Options:
--blkio-weight uint16 Block IO (relative weight), between 10 and 1000, or 0 to disable (default 0)
--cpu-period int Limit CPU CFS (Completely Fair Scheduler) period
--cpu-quota int Limit CPU CFS (Completely Fair Scheduler) quota
--cpu-rt-period int Limit the CPU real-time period in microseconds
--cpu-rt-runtime int Limit the CPU real-time runtime in microseconds
-c, --cpu-shares int CPU shares (relative weight)
--cpus decimal Number of CPUs
--cpuset-cpus string CPUs in which to allow execution (0-3, 0,1)
--cpuset-mems string MEMs in which to allow execution (0-3, 0,1)
-m, --memory bytes Memory limit
--memory-reservation bytes Memory soft limit
--memory-swap bytes Swap limit equal to memory plus swap: -1 to enable unlimited swap
--pids-limit int Tune container pids limit (set -1 for unlimited)
--restart string Restart policy to apply when a container exits |
Beta Was this translation helpful? Give feedback.
0 replies
-
先转换为 Disscussion 继续讨论 |
Beta Was this translation helpful? Give feedback.
0 replies
-
其实是可以判断哪些改了不需要重建容器的配置,如果只改了这些就不重建,改其他的配置项再重建,毕竟一些容器重建风险还是比较大的。 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
1Panel Version
v1.10.29-lts
Please describe your needs or suggestions for improvements
在容器-编辑-重启规则可以不重建容器,直接调用
docker container update --restart=yes <容器名称或ID>
docker container update --restart=no <容器名称或ID>
docker container update --restart=on-failure:5 <容器名称或ID>
docker container update --restart=unless-stopped <容器名称或ID>
Please describe the solution you suggest
No response
Additional Information
No response
Beta Was this translation helpful? Give feedback.
All reactions