OVerride all

This commit is contained in:
wpetit 2017-07-11 14:36:22 +02:00
parent 7f8a13bd52
commit f1bccc8e23
1 changed files with 14 additions and 14 deletions

14
package
View File

@ -21,7 +21,7 @@ def create_args_parser():
parser.add_argument("--rebuild", help="Ignore cache and rebuild container's image", action="store_true", default=False)
parser.add_argument("--debug", help="Will add extra output and start the container in interactive mode", action="store_true", default=False)
parser.add_argument("--cleanup", help="Clear the workspace and remove obsolete Docker images before build", action="store_true", default=False)
parser.add_argument("-f", "--override-run-flags", help="Override 'docker run' flags", default=[], action='append')
parser.add_argument("--override-docker-args", help="Override all 'docker run' arguments. You can use this flag multiple times to add custom arguments", default=[], action='append')
return parser
@ -86,15 +86,15 @@ if __name__ == "__main__":
kwargs = dict()
kwargs['debug'] = args.debug
docker_args = [
"run",
"--rm",
]
docker_args = []
# Append custom arguments
if len(args.override_run_flags) > 0:
docker_args += args.override_run_flags
if len(args.override_docker_args) > 0:
docker_args += args.override_docker_args
else:
docker_args += [ "run", "--rm" ]
# volumes definition
docker_args += [
"-v", "{:s}:/src:ro".format(project_dir),