emu-docker create: add --name flag to override generated image name#410
Merged
Merged
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
This was referenced May 16, 2026
Adds a --name flag to `emu-docker create` that overrides the auto-generated image name (which is otherwise built from <sdk>-<tag>-<cpu>). Useful for deployments with their own naming conventions, e.g. matching an internal registry's path layout. When unset, behavior is unchanged. Original implementation by Greger Stolt Nilsen from google#359; cherry-picked onto current master here.
71818ff to
155e061
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
emu-docker createauto-generates image names like36-google-x64-ps16kfrom system image properties. Sensible default, but doesn't fit deployments that have their own image-naming convention (e.g.,prod-emu-android16, or matching an internal registry's path layout).Change
Adds a
--nameflag toemu-docker createthat overrides the auto-generated image name. When unset, behavior is unchanged.emu-docker create stable "Q google_apis x86_64" --name my-custom-image-nameCredit
Rebase + extraction of @gregersn's #359, which bundled this with an unrelated
ANDROID_REPOSITORYenv-var feature. Splitting into two PRs (this one + a follow-up for the repository override). Original commit authored 2021-11-04; preserved here asAuthor: Greger Stolt Nilsen <greger@fusetools.com>via cherry-pick onto current master. No code changes from the original — clean cherry-pick, no rebase conflicts.Test plan
pytest tests/ --ignore=tests/e2e) on the cherry-picked commitemu-docker create --helplists--name NAME Name to give image when pushed.EmulatorContainer.image_name()returns the override whenself.nameis setname=None(the default) preserves the existing<sdk>-<tag>-<cpu>auto-generation path (covered by existing unit tests)