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 \
|
libseccomp-dev \
|
||||||
--no-install-recommends
|
--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
|
# Allow overriding the version of runc to install through build-args
|
||||||
ARG RUNC_VERSION
|
ARG RUNC_VERSION
|
||||||
ARG GOPROXY=direct
|
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`
|
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
|
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
|
of runc that is tested against in our CI can be found in the [`script/setup/runc-version`](../script/setup/runc-version)
|
||||||
in the [`script/setup/install-runc`](../script/setup/install-runc) script, which
|
file, which may point to a git-commit (for pre releases) or tag in the runc
|
||||||
may point to a git-commit (for pre releases) or tag in the runc repository.
|
repository.
|
||||||
|
|
||||||
For regular (non-pre-)releases of containerd releases, we attempt to use released
|
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
|
(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
|
If you encounter any runtime errors, make sure your runc is in sync with the
|
||||||
commit or tag provided in that file.
|
commit or tag provided in that file.
|
||||||
|
@ -21,8 +21,10 @@
|
|||||||
set -eu -o pipefail
|
set -eu -o pipefail
|
||||||
|
|
||||||
function install_runc() {
|
function install_runc() {
|
||||||
# When updating RUNC_VERSION, consider updating the runc module in go.mod as well
|
script_dir="$(cd -- "$(dirname -- "$0")" > /dev/null 2>&1; pwd -P)"
|
||||||
: "${RUNC_VERSION:=v1.0.0-rc93}"
|
|
||||||
|
# When updating runc-version, consider updating the runc module in go.mod as well
|
||||||
|
: "${RUNC_VERSION:=$(cat "${script_dir}/runc-version")}"
|
||||||
|
|
||||||
TMPROOT=$(mktemp -d)
|
TMPROOT=$(mktemp -d)
|
||||||
git clone https://github.com/opencontainers/runc.git "${TMPROOT}"/runc
|
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