Name container by default with Image alias when starting container
See original GitHub issueIf an image has an <alias>
, the container created during docker:start
should be named with the alias. If already a container with name exists, then a suffix should be added until the name is unique. E.g. if the alias db
is alread taken, try db_1
, db_2
, … until a free name is found.
See #35 for a discussion about this.
Issue Analytics
- State:
- Created 9 years ago
- Comments:12
Top Results From Across the Web
Docker run reference
If you do not assign a container name with the --name option, then the daemon generates a random string name for you. Defining...
Read more >Container image short names in Podman | Enable Sysadmin
If the selected image is pulled successfully, Podman will automatically record a new short-name alias in the users $HOME/.config/containers/ ...
Read more >How to change docker's default container name and host alias?
If you are running the containers using docker run then you can use --name to specify container_name and --hostname to specify hostname.
Read more >ContainerDefinition - Amazon Elastic Container Service
The image used to start a container. This string is passed directly to the Docker daemon. By default, images in the Docker Hub...
Read more >The Docker executor - GitLab Docs
For name resolution to work, Docker manipulates the /etc/hosts file in the container to include the service container hostname and alias.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
so i’m just going to pick the discussion up here…
what happens if i have multiple aliases defined w/in the ‘images’ configuration, which one gets used?
i’m also not sure i would want the name to ‘auto increment’ if a container with the same name is running. personally, i would want that to be an error so perhaps that could be an option in the configuration.
Fixed in 0.11.3