Use local env to avoid writing to passed-in readonly env.

Signed-off-by: Lantao Liu <lantaol@google.com>
This commit is contained in:
Lantao Liu 2019-04-03 16:54:43 -07:00
parent b23b406fed
commit ebca0c4d4e

View File

@ -181,14 +181,14 @@ disabled_plugins = ["restart"]
EOF EOF
chmod 644 "${config_path}" chmod 644 "${config_path}"
# CONTAINERD_EXTRA_RUNTIME_HANDLER is the extra runtime handler to install. # containerd_extra_runtime_handler is the extra runtime handler to install.
CONTAINERD_EXTRA_RUNTIME_HANDLER=${CONTAINERD_EXTRA_RUNTIME_HANDLER:-""} containerd_extra_runtime_handler=${CONTAINERD_EXTRA_RUNTIME_HANDLER:-""}
if [[ -n "${CONTAINERD_EXTRA_RUNTIME_HANDLER}" ]]; then if [[ -n "${containerd_extra_runtime_handler}" ]]; then
cat >> ${config_path} <<EOF cat >> ${config_path} <<EOF
[plugins.cri.containerd.runtimes.${CONTAINERD_EXTRA_RUNTIME_HANDLER}] [plugins.cri.containerd.runtimes.${containerd_extra_runtime_handler}]
runtime_type = "${CONTAINERD_EXTRA_RUNTIME_TYPE:-io.containerd.runc.v1}" runtime_type = "${CONTAINERD_EXTRA_RUNTIME_TYPE:-io.containerd.runc.v1}"
[plugins.cri.containerd.runtimes.${CONTAINERD_EXTRA_RUNTIME_HANDLER}.options] [plugins.cri.containerd.runtimes.${containerd_extra_runtime_handler}.options]
${CONTAINERD_EXTRA_RUNTIME_OPTIONS:-} ${CONTAINERD_EXTRA_RUNTIME_OPTIONS:-}
EOF EOF
fi fi