|
1 | | -containerd is built with OCI support and with support for advanced features provided by [runc](https://github.com/opencontainers/runc). |
| 1 | +containerd is built with OCI support and with support for advanced features |
| 2 | +provided by [runc](https://github.com/opencontainers/runc). |
2 | 3 |
|
3 | | -We depend on a specific `runc` version when dealing with advanced features. You should have a specific runc build for development. The current supported runc commit is described in [`go.mod`](../go.mod). Please refer to the line that starts with `github.com/opencontainers/runc`. |
| 4 | +Development (`-dev`) and pre-releases of containerd may depend features in `runc` |
| 5 | +that have not yet been released, and may require a specific runc build. The version |
| 6 | +of runc that is tested against in our CI can be found in the [`script/setup/runc-version`](../script/setup/runc-version) |
| 7 | +file, which may point to a git-commit (for pre releases) or tag in the runc |
| 8 | +repository. |
4 | 9 |
|
5 | | -For more information on how to clone and build runc see the runc Building [documentation](https://github.com/opencontainers/runc#building). |
| 10 | +For regular (non-pre-)releases of containerd releases, we attempt to use released |
| 11 | +(tagged) versions of runc. We recommend using a version of runc that's equal to |
| 12 | +or higher than the version of runc described in [`script/setup/runc-version`](../script/setup/runc-version). |
6 | 13 |
|
7 | | -Note: before building you may need to install additional support, which will vary by platform. For example, you may need to install `libseccomp` e.g. `libseccomp-dev` for Ubuntu. |
| 14 | +If you encounter any runtime errors, make sure your runc is in sync with the |
| 15 | +commit or tag provided in that file. |
8 | 16 |
|
9 | 17 | ## building |
10 | 18 |
|
11 | | -From within your `opencontainers/runc` repository run: |
| 19 | +> For more information on how to clone and build runc also refer to the runc |
| 20 | +> building [documentation](https://github.com/opencontainers/runc#building). |
| 21 | +
|
| 22 | +Before building runc you may need to install additional build dependencies, which |
| 23 | +will vary by platform. For example, you may need to install `libseccomp` e.g. |
| 24 | +`libseccomp-dev` for Ubuntu. |
12 | 25 |
|
13 | | -### apparmor |
| 26 | +From within your `opencontainers/runc` repository run: |
14 | 27 |
|
15 | 28 | ```bash |
16 | | -make BUILDTAGS='seccomp apparmor' && sudo make install |
| 29 | +make && sudo make install |
17 | 30 | ``` |
18 | 31 |
|
19 | | -### selinux |
| 32 | +Starting with runc 1.0.0-rc93, the "selinux" and "apparmor" buildtags have been |
| 33 | +removed, and runc builds have SELinux, AppArmor, and seccomp support enabled |
| 34 | +by default. Note that "seccomp" can be disabled by passing an empty `BUILDTAGS` |
| 35 | +make variable, but is highly recommended to keep enabled. |
20 | 36 |
|
21 | | -```bash |
22 | | -make BUILDTAGS='seccomp selinux' && sudo make install |
| 37 | +By default, runc is compiled with kernel-memory limiting support enabled. This |
| 38 | +functionality is deprecated in kernel 5.4 and up, and is known to be broken on |
| 39 | +RHEL7 and CentOS 7 3.10 kernels. For these kernels, we recommend disabling kmem |
| 40 | +support using the `nokmem` build-tag. When doing so, be sure to set the `seccomp` |
| 41 | +build-tag to enable seccomp support, for example: |
| 42 | + |
| 43 | +```sh |
| 44 | +make BUILDTAGS='nokmem seccomp' && make install |
23 | 45 | ``` |
24 | 46 |
|
25 | | -After an official runc release we will start pinning containerd support to a specific version but various development and testing features may require a newer runc version than the latest release. If you encounter any runtime errors, please make sure your runc is in sync with the commit/tag provided in this document. |
| 47 | +For details about the `nokmem` build-tag, refer to the discussion on [opencontainers/runc#2594](https://github.com/opencontainers/runc/pull/2594). |
| 48 | +For further details on building runc, refer to the [build instructions in the runc README](https://github.com/opencontainers/runc#building). |
0 commit comments