Home/Reference/CLI reference/docker/docker container/docker container update DescriptionUpdate configuration of one or more containers Usagedocker container update [OPTIONS] CONTAINER [CONTAINER...] Aliases docker update Description Thedocker updatecommand dynamically updates container configuration. You can use...
commit Create a new image from a container's changescpCopy files/folders between a container and the local filesystem create Create a new containerdiffInspect changes to files or directories on a container's filesystemevents Get realtimeevents from the server exec Run a commandina running contain...
stats Display a live stream of container(s) resource usage statistics stop Stop one or more running containers tag Create a tag TARGET_IMAGE that refers to SOURCE_IMAGE top Display the running processes of a container unpause Unpause all processes within one or more containers update Update config...
docker ps -aq: 查看所有的容器只显示容器id docker container ls -a | awk {'print$列号'}: 查看所有的容器只显示指定的列号 示例:docker container ls -a | awk {'print$1'}: 查看所有的容器只显示容器id docker ps -f "status=exited" [-q]exited退出的容器 [-q]只返回容器id docker stop 容器...
docker container update --restart=always 容器名字 2、直接改配置文件 首先停止容器,不然无法修改配置文件 配置文件路径为:/var/lib/docker/containers/容器ID 在该目录下找到一个文件hostconfig.json,找到该文件中关键字RestartPolicy 修改前配置:"RestartPolicy":{"Name":"no","MaximumRetryCount":0} ...
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES fe8f308023cf redis "docker-entrypoint.s…" 20 seconds ago Up Less than a second 6379/tcp serene_pascal # 案例3:已经运行或创建的容器,用 docker update 更改重启策略 [root@localhost ~]# docker update --restart=on-failure:3 fe8f308 ...
config Manage Docker configs // 管理 docker 配置 container Manage containers // 管理容器 context Manage contexts // 管理上下文 engine Manage the docker engine // 管理docker引擎 image Manage images // 管理镜像 network Manage networks // 管理网络 ...
tagCreatea tagTARGET_IMAGEthat refers toSOURCE_IMAGEtopDisplaythe running processes of a container unpauseUnpauseall processes within one or more containers updateUpdateconfiguration of one or more containers versionShowtheDockerversion information
docker container update --restart=always 容器名字 2、直接改配置文件 首先停止容器,不然无法修改配置文件 配置文件路径为:/var/lib/docker/containers/容器ID 在该目录下找到一个文件hostconfig.json,找到该文件中关键字RestartPolicy 修改前配置:"RestartPolicy":{"Name":"no","MaximumRetryCount":0} ...