containers / toolbox

Tool for interactive command line environments on Linux
https://containertoolbx.org/
Apache License 2.0
2.38k stars 208 forks source link

cmd/create, pkg/podman: Let 'create' use an image without a name #1486

Closed debarshiray closed 1 month ago

debarshiray commented 1 month ago

Currently, it's not possible to create a Toolbx container from an image without a name:

  $ podman build --squash images/fedora/f39
  STEP 1/21: FROM registry.fedoraproject.org/fedora:39
  STEP 2/21: ARG NAME=fedora-toolbox
  STEP 3/21: ARG VERSION=39
  ...
  --> 2f9bdf11c8d4
  2f9bdf11c8d4d7674dfb17d8edcfd13475d8636077f1a6208ecd616de77d7f80
  $ toolbox create --image 2f9bdf11c8d4
  Error: empty RepoTag for image 2f9bdf11c8d4

The image's fully qualified name is fetched from its RepoTags for purely cosmetic reasons to show a human-readable name in the debug logs. Therefore, there's no reason to fail the creation of a Toolbx container in the absence of it.

Note that an image without a name will have an empty RepoTags array in the JSON returned by podman inspect --format json --type image. It's different from not having a RepoTags array at all in the JSON. This may or may not be indicative of a more serious problem and will continue to fail the creation of the Toolbx container as before.

softwarefactory-project-zuul[bot] commented 1 month ago

Build succeeded. https://softwarefactory-project.io/zuul/t/local/buildset/453a7c3de8084d69ab31755eea52a1ef

:heavy_check_mark: unit-test SUCCESS in 6m 40s :heavy_check_mark: unit-test-migration-path-for-coreos-toolbox SUCCESS in 2m 55s :heavy_check_mark: unit-test-restricted SUCCESS in 5m 44s :heavy_check_mark: system-test-fedora-rawhide SUCCESS in 36m 25s :heavy_check_mark: system-test-fedora-40 SUCCESS in 35m 03s :heavy_check_mark: system-test-fedora-39 SUCCESS in 35m 03s :heavy_check_mark: system-test-fedora-38 SUCCESS in 34m 41s

softwarefactory-project-zuul[bot] commented 1 month ago

Build succeeded. https://softwarefactory-project.io/zuul/t/local/buildset/cfe495ee76c6498995227810af28a3a4

:heavy_check_mark: unit-test SUCCESS in 6m 30s :heavy_check_mark: unit-test-migration-path-for-coreos-toolbox SUCCESS in 2m 51s :heavy_check_mark: unit-test-restricted SUCCESS in 5m 36s :heavy_check_mark: system-test-fedora-rawhide SUCCESS in 38m 15s :heavy_check_mark: system-test-fedora-40 SUCCESS in 36m 48s :heavy_check_mark: system-test-fedora-39 SUCCESS in 37m 59s :heavy_check_mark: system-test-fedora-38 SUCCESS in 37m 02s

softwarefactory-project-zuul[bot] commented 1 month ago

Build succeeded. https://softwarefactory-project.io/zuul/t/local/buildset/7a4fd2dd2f8f4f62bbc89ff4a54851e3

:heavy_check_mark: unit-test SUCCESS in 7m 03s :heavy_check_mark: unit-test-migration-path-for-coreos-toolbox SUCCESS in 3m 26s :heavy_check_mark: unit-test-restricted SUCCESS in 5m 41s :heavy_check_mark: system-test-fedora-rawhide SUCCESS in 37m 48s :heavy_check_mark: system-test-fedora-40 SUCCESS in 37m 39s :heavy_check_mark: system-test-fedora-39 SUCCESS in 38m 09s :heavy_check_mark: system-test-fedora-38 SUCCESS in 36m 30s

softwarefactory-project-zuul[bot] commented 1 month ago

Build succeeded. https://softwarefactory-project.io/zuul/t/local/buildset/131f6b5162f7423bb1abcfde19060c59

:heavy_check_mark: unit-test SUCCESS in 6m 30s :heavy_check_mark: unit-test-migration-path-for-coreos-toolbox SUCCESS in 3m 24s :heavy_check_mark: unit-test-restricted SUCCESS in 5m 42s :heavy_check_mark: system-test-fedora-rawhide SUCCESS in 37m 13s :heavy_check_mark: system-test-fedora-40 SUCCESS in 34m 16s :heavy_check_mark: system-test-fedora-39 SUCCESS in 35m 26s :heavy_check_mark: system-test-fedora-38 SUCCESS in 34m 41s

softwarefactory-project-zuul[bot] commented 1 month ago

Build succeeded. https://softwarefactory-project.io/zuul/t/local/buildset/15d9c74409f7456e902d496c43c2204a

:heavy_check_mark: unit-test SUCCESS in 6m 30s :heavy_check_mark: unit-test-migration-path-for-coreos-toolbox SUCCESS in 3m 18s :heavy_check_mark: unit-test-restricted SUCCESS in 5m 30s :heavy_check_mark: system-test-fedora-rawhide SUCCESS in 35m 55s :heavy_check_mark: system-test-fedora-40 SUCCESS in 35m 16s :heavy_check_mark: system-test-fedora-39 SUCCESS in 34m 30s :heavy_check_mark: system-test-fedora-38 SUCCESS in 34m 27s