diff --git a/contrib/Dockerfile.test b/contrib/Dockerfile.test index 500aff8d0..eeb6fb4e5 100644 --- a/contrib/Dockerfile.test +++ b/contrib/Dockerfile.test @@ -36,7 +36,7 @@ RUN apt-get update && apt-get install -y \ libseccomp-dev \ --no-install-recommends -COPY script/setup/install-runc install-runc +COPY script/setup/runc-version script/setup/install-runc ./ # Allow overriding the version of runc to install through build-args ARG RUNC_VERSION ARG GOPROXY=direct diff --git a/docs/RUNC.md b/docs/RUNC.md index 2f35a2ce4..281c4b302 100644 --- a/docs/RUNC.md +++ b/docs/RUNC.md @@ -3,13 +3,13 @@ provided by [runc](https://github.com/opencontainers/runc). Development (`-dev`) and pre-releases of containerd may depend features in `runc` that have not yet been released, and may require a specific runc build. The version -of runc that is tested against in our CI can be found in the `RUNC_VERSION` variable -in the [`script/setup/install-runc`](../script/setup/install-runc) script, which -may point to a git-commit (for pre releases) or tag in the runc repository. +of runc that is tested against in our CI can be found in the [`script/setup/runc-version`](../script/setup/runc-version) +file, which may point to a git-commit (for pre releases) or tag in the runc +repository. For regular (non-pre-)releases of containerd releases, we attempt to use released (tagged) versions of runc. We recommend using a version of runc that's equal to -or higher than the version of runc described in [`script/setup/install-runc`](../script/setup/install-runc). +or higher than the version of runc described in [`script/setup/runc-version`](../script/setup/runc-version). If you encounter any runtime errors, make sure your runc is in sync with the commit or tag provided in that file. diff --git a/script/setup/install-runc b/script/setup/install-runc index 35d9ca146..7717cb1fa 100755 --- a/script/setup/install-runc +++ b/script/setup/install-runc @@ -21,8 +21,10 @@ set -eu -o pipefail function install_runc() { - # When updating RUNC_VERSION, consider updating the runc module in go.mod as well - : "${RUNC_VERSION:=v1.0.0-rc93}" + script_dir="$(cd -- "$(dirname -- "$0")" > /dev/null 2>&1; pwd -P)" + + # When updating runc-version, consider updating the runc module in go.mod as well + : "${RUNC_VERSION:=$(cat "${script_dir}/runc-version")}" TMPROOT=$(mktemp -d) git clone https://github.com/opencontainers/runc.git "${TMPROOT}"/runc diff --git a/script/setup/runc-version b/script/setup/runc-version new file mode 100644 index 000000000..e989c7fe6 --- /dev/null +++ b/script/setup/runc-version @@ -0,0 +1 @@ +v1.0.0-rc93