Add docker_create_options command, so that config files can specify additional options for docker create command.

This commit is contained in:
Adrian Kuschelyagi Malacoda 2021-06-23 09:00:35 -05:00
parent 488dedb74e
commit d7052998c8

View File

@ -246,7 +246,8 @@ config = {
"cwd": os.getcwd(), "cwd": os.getcwd(),
"tty": sys.stdout.isatty(), "tty": sys.stdout.isatty(),
"log": log, "log": log,
"user_init_command": [] "user_init_command": [],
"docker_create_options": []
} }
# load config from files # load config from files
@ -321,7 +322,7 @@ except Exception:
docker_create( docker_create(
image_name, image_name,
container_name, container_name,
DOCKER_CREATE_OPTIONS + create_x11_mapping() + expand_user_volumes(user_volumes), DOCKER_CREATE_OPTIONS + config.get("docker_create_options", []) + create_x11_mapping() + expand_user_volumes(user_volumes),
BACKGROUND_COMMAND, { OTHERWORLD_LABEL: user } BACKGROUND_COMMAND, { OTHERWORLD_LABEL: user }
) )
container = docker_inspect(container_name)[0] container = docker_inspect(container_name)[0]