If you define the name and label of the mirror.

  docker, question

For example: docker-compose.yml reads as follows:

 build: .
 - "6379:6379"

After docker-compose up is executed, the name of the mirror image is redis_redis tag as latest. How do you configure the name and label of this mirror image?

REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
 redis_redis         latest

Docker-compose is a container generated based on your original image. redis is defined in your yml file. redis is the alias of this container after generation. You can use the name redis directly afterwards. Docker-composeexexecutivesbash goes in to your redis container.