diff --git a/src/services/execution/spec/specs_mount.c b/src/services/execution/spec/specs_mount.c index 979be1e78137b33ded1ef328fc080bbfa9538e3b..a52efe16bf8ac7766a21ecc433ecfc25ec5e16c9 100644 --- a/src/services/execution/spec/specs_mount.c +++ b/src/services/execution/spec/specs_mount.c @@ -2317,6 +2317,17 @@ int merge_conf_mounts(oci_runtime_spec *oci_spec, host_config *host_spec, int ret = 0; container_config *container_spec = v2_spec->config; + /* mounts to mount filesystem */ + if (container_spec->mounts && container_spec->mounts_len) { + ret = merge_volumes(oci_spec, container_spec->mounts, + container_spec->mounts_len, v2_spec, + parse_mount); + if (ret) { + ERROR("Failed to merge mounts"); + goto out; + } + } + /* volumes to mount */ if (host_spec->binds != NULL && host_spec->binds_len) { ret = merge_volumes(oci_spec, host_spec->binds, @@ -2336,17 +2347,6 @@ int merge_conf_mounts(oci_runtime_spec *oci_spec, host_config *host_spec, } } - /* mounts to mount filesystem */ - if (container_spec->mounts && container_spec->mounts_len) { - ret = merge_volumes(oci_spec, container_spec->mounts, - container_spec->mounts_len, v2_spec, - parse_mount); - if (ret) { - ERROR("Failed to merge mounts"); - goto out; - } - } - if (host_spec->shm_size == 0) { host_spec->shm_size = DEFAULT_SHM_SIZE; }