move runc version to a separate file for easier consumption
This moves the runc version to build to scripts/setup/runc-version, which makes it easier for packagers to find the default version to use. The RUNC_VERSION environment variable can still be used to override the version, which can be used (e.g.) to test against different versions in our CI. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
8325ba5d36
commit
79a51cd16a
@ -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
|
||||
|
@ -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.
|
||||
|
@ -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
|
||||
|
1
script/setup/runc-version
Normal file
1
script/setup/runc-version
Normal file
@ -0,0 +1 @@
|
||||
v1.0.0-rc93
|
Loading…
Reference in New Issue
Block a user