标记一个Docker容器? [英] Tag a docker container?
本文介绍了标记一个Docker容器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有以下情况:
- 使用Docker连续交付
- 从GitHub构建映像存储库
- 停止当前运行的容器
- 使用较新的映像启动当前运行的容器
- Continuous Delivery with Docker
- Build Image from GitHub repository
- Stop the current running container
- Start the current running container with the newer image
要停止容器,我需要容器ID。
一旦启动容器,是否可以将可重用标签分配给容器,这样我就知道要停止部署新容器时要停止哪个容器?</ p>
For stopping the container, I need the container ID. Can I assign a reusable tag to a container once I start it, so I know which container to stop, once a newer image is ready for deployment?
推荐答案
docker run --name ContainerID .....请参阅此处了解详情
docker run --name "ContainerID" ..... See here for more details
这篇关于标记一个Docker容器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文