question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Name container by default with Image alias when starting container

See original GitHub issue

If 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:closed
  • Created 9 years ago
  • Comments:12

github_iconTop GitHub Comments

1reaction
jgangemicommented, Nov 19, 2014

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.

0reactions
rhusscommented, Apr 21, 2015

Fixed in 0.11.3

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found