From 415696ba6a979ae448c32493ed243a015ad649ac Mon Sep 17 00:00:00 2001 From: David Anderson Date: Thu, 21 Nov 2024 00:59:13 -0800 Subject: [PATCH] dockerwrapper: work dir defaults to /app --- html/user/buda_submit.php | 2 +- samples/docker_wrapper/docker_wrapper.cpp | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/html/user/buda_submit.php b/html/user/buda_submit.php index 053bbfa371..5d65b71ee9 100644 --- a/html/user/buda_submit.php +++ b/html/user/buda_submit.php @@ -191,7 +191,7 @@ function create_jobs( $job_cmds .= "$job_cmd\n"; } $cmd = sprintf( - 'cd ../..; bin/create_work --appname %s --batch %d --stdin --command_line "--dockerfile %s" --wu_template %s --result_template %s', + 'cd ../..; bin/create_work --appname %s --batch %d --stdin --command_line "--dockerfile %s --verbose" --wu_template %s --result_template %s', $boinc_app->name, $batch_id, $variant_desc->dockerfile, "buda_batches/$batch_dir_name/template_in", "buda_batches/$batch_dir_name/template_out" diff --git a/samples/docker_wrapper/docker_wrapper.cpp b/samples/docker_wrapper/docker_wrapper.cpp index 02b0ae66a1..1e970249b0 100644 --- a/samples/docker_wrapper/docker_wrapper.cpp +++ b/samples/docker_wrapper/docker_wrapper.cpp @@ -122,6 +122,9 @@ DOCKER_CONN docker_conn; // parse job config file // int parse_config_file() { + // defaults + config.workdir = "/app"; + std::ifstream ifs(config_file); if (ifs.fail()) { fprintf(stderr, "no job.toml config file\n"); @@ -137,8 +140,6 @@ int parse_config_file() { x = v.find("workdir"); if (x) { config.workdir = x->as(); - } else { - config.workdir = "/app"; } x = v.find("project_dir_mount"); if (x) {