89luca89 / lilipod

Lilipod is a simple container manager, able to download, unpack and use OCI images from various container registries.
GNU General Public License v3.0
292 stars 13 forks source link

Unable to create container using distrobox create --clone #17

Open eugenesan opened 4 months ago

eugenesan commented 4 months ago

I am trying to clone existing distrobox container using: distrobox create -v --name neon --clone ubuntu. It fails with: 2024/05/23 18:43:34 no such object: [ubuntu --format {{.State.Status}}]

I tried using container ID with the same result. Container ubuntu exists and working correctly. I am able to create fresh containers.

Seems like lilipod is unable to parse command line when options and arguments are provided in a mixed order. Eg: lilipod --log-level debug inspect --type container --format {{.State.Status}} ubuntu - works lilipod --log-level debug inspect --type container ubuntu --format {{.State.Status}} - fails Not sure if the fix should come on the lilipod side or distrobox side...

Verbose output:

$ distrobox create -v --name neon --clone ubuntu
+ [ -z ubuntu ]
+ [ -z neon ]
+ [ -z neon ]
+ [ -z  ]
+ uname -n
+ container_hostname=mypc
+ [ 0 -eq 1 ]
+ printf %s mypc
+ wc -m
+ [ 4 -gt 64 ]
+ container_manager=lilipod
+ command -v lilipod
+ [ 1 -ne 0 ]
+ container_manager=lilipod --log-level debug
+ [ 0 -ne 0 ]
+ [ 0 -ne 0 ]
+ [ -n  ]
+ [ -z /usr/bin/distrobox-init ]
+ [ -z /usr/bin/distrobox-export ]
+ [ 0 -ne 0 ]
+ lilipod --log-level debug inspect --type container neon
+ [ -n ubuntu ]
+ get_clone_image
+ lilipod --log-level debug inspect --type container ubuntu --format {{.State.Status}}
2024/05/23 18:44:17 no such object: [ubuntu --format {{.State.Status}}]
+ container_source_status=
+ container_image=
eugenesan commented 4 months ago

Seems like even if 'ispect' syntax issue are fixed, lilipod doesn't support 'commit'.