This enables passing arguments to custom build scripts. e.g. with a build script called test_args.py containing:
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('filename') # positional argument
parser.add_argument('-c', '--count') # option that takes a value
parser.add_argument('-v', '--verbose',
action='store_true') # on/off flag
args = parser.parse_args()
print(f"{args.filename=} | {args.count=} | {args.verbose=}")
Can now pass in arguments via run-docker:
./run-docker.sh build_custom .. test_args abc -c 12 -v
...
args.filename='abc' | args.count='12' | args.verbose=True
The program finished and will be restarted
This enables passing arguments to custom build scripts. e.g. with a build script called
test_args.py
containing:Can now pass in arguments via run-docker: