Skip to main content

What happens if you run a container without specifying --name?

Entry Docker
Quick Answer Docker generates a random two-word name (e.g., "quirky_tesla"). The container still gets a unique ID regardless. The auto-generated name is for human convenience in docker ps รขโ‚ฌโ€ you can use it in commands instead of the full ID. Using --name yourself makes scripts and logs more readable.

Answer

Docker assigns a random name automatically, such as friendly_moose.
S
SugharaIQ Editorial Team Verified Answer

This answer has been peer-reviewed by industry experts holding senior engineering roles to ensure technical accuracy and relevance for modern interview standards.

Want to bookmark, take notes, or join discussions?

Sign in to access all features and personalize your learning experience.

Sign In Create Account

Source: SugharaIQ

Ready to level up? Start Practice