Skip to content

Commit 576e527

Browse files
committed
make podman a separate command rodman
1 parent b99bb9a commit 576e527

2 files changed

Lines changed: 11 additions & 3 deletions

File tree

setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@
3838
'package_data': {'rocker': ['templates/*.em']},
3939
'entry_points': {
4040
'console_scripts': [
41-
'rocker = rocker.cli:main',
41+
'rocker = rocker.cli:rocker_main',
42+
'rodman = rocker.cli:rodman_main',
4243
'detect_docker_image_os = rocker.cli:detect_image_os',
4344
],
4445
'rocker.extensions': [

src/rocker/cli.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
from .os_detector import detect_os
2626

2727

28-
def main():
28+
def main(implementation='rocker'):
2929

3030
parser = argparse.ArgumentParser(
3131
description='A tool for running docker with extra options',
@@ -36,7 +36,6 @@ def main():
3636
parser.add_argument('--nocache', action='store_true')
3737
parser.add_argument('--nocleanup', action='store_true', help='do not remove the docker container when stopped')
3838
parser.add_argument('--pull', action='store_true')
39-
parser.add_argument('--use-podman', action='store_true')
4039
parser.add_argument('--version', action='version',
4140
version='%(prog)s ' + get_rocker_version())
4241

@@ -50,6 +49,7 @@ def main():
5049

5150
args = parser.parse_args()
5251
args_dict = vars(args)
52+
args_dict['use_podman'] = implementation == 'podman'
5353

5454
if args.noexecute:
5555
from .core import OPERATIONS_DRY_RUN
@@ -89,3 +89,10 @@ def detect_image_os():
8989
return 0
9090
else:
9191
return 1
92+
93+
def rocker_main():
94+
return main(implementation='rocker')
95+
96+
97+
def rodman_main():
98+
return main(implementation='podman')

0 commit comments

Comments
 (0)