File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -31,11 +31,6 @@ function set_container_volumes() {
31
31
readarray -t container_volumes <<< " ${docker_output}"
32
32
}
33
33
34
- container_id=" $( get_container_id) "
35
- container_root_dir=" $( get_container_root_dir " ${container_id} " ) "
36
- set_container_volumes " ${container_id} "
37
- readonly container_id container_root_dir container_volumes
38
-
39
34
function fix_volume_arg() {
40
35
local source=" ${volume_arg%% " :" * } "
41
36
local destination=" ${volume_arg#* " :" } "
@@ -46,6 +41,14 @@ function fix_volume_arg() {
46
41
# fi
47
42
48
43
if [[ " ${source} " == " /" * ]]; then
44
+ if [[ " ${container_data_fetched} " == false ]]; then
45
+ container_id=" $( get_container_id) "
46
+ container_root_dir=" $( get_container_root_dir " ${container_id} " ) "
47
+ set_container_volumes " ${container_id} "
48
+ readonly container_id container_root_dir container_volumes
49
+ container_data_fetched=true
50
+ fi
51
+
49
52
for container_volume in " ${container_volumes[@]} " ; do
50
53
local container_volume_source=" ${container_volume%% " :" * } "
51
54
local container_volume_destination=" ${container_volume#* " :" } "
@@ -175,6 +178,7 @@ for i in "${!original_args[@]}"; do
175
178
fi
176
179
done
177
180
181
+ container_data_fetched=false
178
182
fixed_args=()
179
183
extra_args=()
180
184
fix_next_arg=false
You can’t perform that action at this time.
0 commit comments