Skip to content

Commit 8baeaff

Browse files
Merge pull request #2460 from stevvooe/runc-build-instructions
build: include instructions for runc build
2 parents cb4bf20 + a5e0916 commit 8baeaff

1 file changed

Lines changed: 29 additions & 0 deletions

File tree

BUILDING.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ To build the `containerd` daemon, and the `ctr` simple test client, the followin
1717
* Go 1.10.x or above
1818
* Protoc 3.x compiler and headers (download at the [Google protobuf releases page](https://github.com/google/protobuf/releases))
1919
* Btrfs headers and libraries for your distribution. Note that building the btrfs driver can be disabled via the build tag `no_btrfs`, removing this dependency.
20+
* `libseccomp` is required if you're building with seccomp support
2021

2122
## Build the development environment
2223

@@ -43,8 +44,36 @@ need to satisfy this dependencies in your system:
4344
* CentOS/Fedora: `yum install btrfs-progs-devel`
4445
* Debian/Ubuntu: `apt-get install btrfs-tools`
4546

47+
If you're building with seccomp, you'll need to install it with the following:
48+
49+
* Debian/Ubuntu: `apt install libseccomp-dev`
50+
4651
At this point you are ready to build `containerd` yourself!
4752

53+
## Build runc
54+
55+
`runc` is the default container runtime used by `containerd` and is required to
56+
run containerd. While it is okay to download a runc binary and install that on
57+
the system, sometimes it is necessary to build runc directly when working with
58+
container runtime development. You can skip this step if you already have the
59+
correct version of `runc` installed.
60+
61+
For the quick and dirty installation, you can use the following:
62+
63+
go get github.com/opencontainers/runc
64+
65+
This is not recommended, as the generated binary will not have version
66+
information. Instead, cd into the source directory and use make to build and
67+
install the binary:
68+
69+
cd $GOPATH/src/github.com/opencontainers/runc
70+
make
71+
make install
72+
73+
Make sure to follow the guidelines for versioning in [RUNC.md](RUNC.md) for the
74+
best results. Some pointers on proper build tag setupVersion mismatches can
75+
result in undefined behavior.
76+
4877
## Build containerd
4978

5079
`containerd` uses `make` to create a repeatable build flow. It means that you

0 commit comments

Comments
 (0)