From d7052998c87992898f4d89a990212d5852f8deeb Mon Sep 17 00:00:00 2001 From: Adrian Malacoda Date: Wed, 23 Jun 2021 09:00:35 -0500 Subject: [PATCH] Add docker_create_options command, so that config files can specify additional options for docker create command. --- otherworld | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/otherworld b/otherworld index f14f6b5..db4f028 100755 --- a/otherworld +++ b/otherworld @@ -246,7 +246,8 @@ config = { "cwd": os.getcwd(), "tty": sys.stdout.isatty(), "log": log, - "user_init_command": [] + "user_init_command": [], + "docker_create_options": [] } # load config from files @@ -321,7 +322,7 @@ except Exception: docker_create( image_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 } ) container = docker_inspect(container_name)[0]