Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
# importlib-metadata dependency can be removed when RHEL8 and other 3.6 based systems are not in support cycles

install_requires = [
'configargparse',
'empy',
'importlib-metadata; python_version < "3.8"',
'pexpect',
Expand Down
8 changes: 6 additions & 2 deletions src/rocker/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
# limitations under the License.

import argparse
import configargparse
import os
import sys

Expand All @@ -31,11 +32,14 @@

def main():

parser = argparse.ArgumentParser(
parser = configargparse.ArgumentParser(
config_file_parser_class=configargparse.TomlConfigParser(['rocker.config']),
description='A tool for running docker with extra options',
formatter_class=argparse.ArgumentDefaultsHelpFormatter)
default_config_files=['config.toml', 'config.ini'],
formatter_class=configargparse.ArgumentDefaultsHelpFormatter)
parser.add_argument('image')
parser.add_argument('command', nargs='*', default='')
parser.add_argument('--config', is_config_file=True)
parser.add_argument('--noexecute', action='store_true', help='Deprecated') # TODO(tfoote) add when 3.13 is minimum supported, deprecated=True
parser.add_argument('--nocache', action='store_true')
parser.add_argument('--nocleanup', action='store_true', help='do not remove the docker container when stopped')
Expand Down