mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
runc.installer: add nokmem build tag for rhel7 kernel
In case we're running on RHEL7 kernel, which has non-working and broken kernel memory controller, add 'nokmem' build tag so that runc never enables kmem accounting. For more info, see the following runc commit: https://github.com/opencontainers/runc/commit/6a2c1559684 This behavior can be overriden by having `RUNC_NOKMEM` environment variable set (e.g. to empty value to disable setting nokmem). Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
parent
335736fb01
commit
8972aa9350
1 changed files with 8 additions and 3 deletions
|
@ -4,10 +4,15 @@
|
|||
RUNC_COMMIT=9f1e94488e5e478e084fef997f022565b64b01d9
|
||||
|
||||
install_runc() {
|
||||
# Do not build with ambient capabilities support
|
||||
RUNC_BUILDTAGS="${RUNC_BUILDTAGS:-"seccomp apparmor selinux"}"
|
||||
# If using RHEL7 kernels (3.10.0 el7), disable kmem accounting/limiting
|
||||
if uname -r | grep -q '^3\.10\.0.*\.el7\.'; then
|
||||
: ${RUNC_NOKMEM='nokmem'}
|
||||
fi
|
||||
|
||||
echo "Install runc version $RUNC_COMMIT"
|
||||
# Do not build with ambient capabilities support
|
||||
RUNC_BUILDTAGS="${RUNC_BUILDTAGS:-"seccomp apparmor selinux $RUNC_NOKMEM"}"
|
||||
|
||||
echo "Install runc version $RUNC_COMMIT (build tags: $RUNC_BUILDTAGS)"
|
||||
git clone https://github.com/opencontainers/runc.git "$GOPATH/src/github.com/opencontainers/runc"
|
||||
cd "$GOPATH/src/github.com/opencontainers/runc"
|
||||
git checkout -q "$RUNC_COMMIT"
|
||||
|
|
Loading…
Add table
Reference in a new issue