misc fixes for distros/images not matching up right
* fix arch/arch-linux mismatch * fix expecting fedora-rawhide (now fedora-*) * fix inconsistency in ubuntu naming * add aliases for arch and ubuntu to avoid breakage
This commit is contained in:
parent
f7c5507d92
commit
4732a5735d
2 changed files with 44 additions and 22 deletions
11
user
11
user
|
@ -156,18 +156,19 @@ def associate_binary(association):
|
|||
|
||||
@cli.command("create-container")
|
||||
@click.argument('container_name')
|
||||
@click.argument('distro', default='arch')
|
||||
@click.argument('distro', required=False)
|
||||
def create_container(container_name, distro):
|
||||
'''
|
||||
Create a container
|
||||
'''
|
||||
if distro not in ('arch', 'almalinux-9', 'crystal-linux', 'debian', 'fedora-38', 'kali-linux', 'neurodebian-bookworm', 'rocky-linux', 'ubuntu-22.04', 'ubuntu-23.04'):
|
||||
error(
|
||||
f'distro {colors.bold}{distro}{colors.reset} not supported')
|
||||
if subprocess.run(['podman', 'container', 'exists', container_name], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL).returncode == 0:
|
||||
error(f'container {colors.bold}{container_name}{colors.reset} already exists')
|
||||
exit(1)
|
||||
subprocess.run(['blend', 'create-container', '-cn', container_name, '-d', distro])
|
||||
args = ['blend', 'create-container', '-cn', container_name]
|
||||
# blend handles no distro being specified already
|
||||
if distro:
|
||||
args.extend(['-d', distro])
|
||||
exit(subprocess.run(args).returncode)
|
||||
|
||||
|
||||
@cli.command("delete-container")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue