mirror of https://github.com/google/oss-fuzz.git
infra: make it possible to cache docker containers build (#12284)
Signed-off-by: David Korczynski <david@adalogics.com>
This commit is contained in:
parent
e409cd2da0
commit
3beb664440
|
@ -721,9 +721,14 @@ def docker_run(run_args, print_output=True, architecture='x86_64'):
|
||||||
"""Calls `docker run`."""
|
"""Calls `docker run`."""
|
||||||
platform = 'linux/arm64' if architecture == 'aarch64' else 'linux/amd64'
|
platform = 'linux/arm64' if architecture == 'aarch64' else 'linux/amd64'
|
||||||
command = [
|
command = [
|
||||||
'docker', 'run', '--rm', '--privileged', '--shm-size=2g', '--platform',
|
'docker', 'run', '--privileged', '--shm-size=2g', '--platform', platform
|
||||||
platform
|
|
||||||
]
|
]
|
||||||
|
if os.getenv('OSS_FUZZ_SAVE_CONTAINERS_NAME'):
|
||||||
|
command.append('--name')
|
||||||
|
command.append(os.getenv('OSS_FUZZ_SAVE_CONTAINERS_NAME'))
|
||||||
|
else:
|
||||||
|
command.append('--rm')
|
||||||
|
|
||||||
# Support environments with a TTY.
|
# Support environments with a TTY.
|
||||||
if sys.stdin.isatty():
|
if sys.stdin.isatty():
|
||||||
command.append('-i')
|
command.append('-i')
|
||||||
|
|
Loading…
Reference in New Issue