2

I have the following scenario:

  • Continuous Delivery with Docker
  • Build Image from GitHub repository
  • Stop the current running container
  • Start the current running container with the newer image

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?

mitchkman
  • 6,201
  • 8
  • 39
  • 67

2 Answers2

2

docker run --name "ContainerID" ..... See here for more details

Usman Ismail
  • 17,999
  • 14
  • 83
  • 165
0

A theoretical equation is rename: docker rename container_id new_name