Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

run: automatically generate a container name from image ref #693

Merged
merged 2 commits into from
Jan 12, 2022

Conversation

AkihiroSuda
Copy link
Member

e.g., nerdctl run nginx creates a container named "nginx-62edd".
See pkg/referenceutil/referenceutil_test.go for more examples.

The generated names are more meaningful than Docker/Podman-generated names such as "jolly_kepler". However, the generated names MUST NOT be parsed.

The name can be unset by specifying --name="" explicitly.

e.g., `nerdctl run nginx` creates a container named "nginx-62edd".
See `pkg/referenceutil/referenceutil_test.go` for more examples.

The generated names are more meaningful than Docker/Podman-generated names such as "jolly_kepler".
However, the generated names MUST NOT be parsed.

The name can be unset by specifying `--name=""` explicitly.

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
@AkihiroSuda AkihiroSuda added this to the v0.16.0 milestone Jan 12, 2022
@AkihiroSuda
Copy link
Member Author

Let me rush this in v0.16 🙏

@AkihiroSuda AkihiroSuda added enhancement New feature or request impact/major labels Jan 12, 2022
To deflake TestRunExitCode

```
=== CONT  TestRunExitCode
    run_test.go:113: assertion failed: 0 (int) != 1 (res.ExitCode int): time="2022-01-12T19:35:26+09:00" level=fatal msg="container \"c6476c53c0a2e092c68fb5a7faf1724eee4cb10d227
d7c6507c7766b65eaa4aa\" in namespace \"nerdctl-test\": not found"
```

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
@AkihiroSuda AkihiroSuda merged commit 0ddaffd into containerd:master Jan 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request impact/major
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants