@@ -32,9 +32,9 @@ git clone https://github.com/containerd/containerd
3232
3333For proper results, install the ` protoc ` release into ` /usr/local ` on your build system. For example, the following commands will download and install the 3.11.4 release for a 64-bit Linux host:
3434
35- ```
36- $ wget -c https://github.com/protocolbuffers/protobuf/releases/download/v3.11.4/protoc-3.11.4-linux-x86_64.zip
37- $ sudo unzip protoc-3.11.4-linux-x86_64.zip -d /usr/local
35+ ``` sh
36+ wget -c https://github.com/protocolbuffers/protobuf/releases/download/v3.11.4/protoc-3.11.4-linux-x86_64.zip
37+ sudo unzip protoc-3.11.4-linux-x86_64.zip -d /usr/local
3838```
3939
4040` containerd ` uses [ Btrfs] ( https://en.wikipedia.org/wiki/Btrfs ) it means that you
@@ -77,7 +77,7 @@ best results.
7777` containerd ` uses ` make ` to create a repeatable build flow. It means that you
7878can run:
7979
80- ```
80+ ``` sh
8181cd containerd
8282make
8383```
@@ -86,7 +86,7 @@ This is going to build all the project binaries in the `./bin/` directory.
8686
8787You can move them in your global path, ` /usr/local/bin ` with:
8888
89- ``` sudo
89+ ``` sh
9090sudo make install
9191```
9292
@@ -99,7 +99,7 @@ Note: if you set one of these vars, set them to the same values on all make stag
9999If you want to prepend an additional prefix on actual installation (eg. packaging or chroot install),
100100you can pass it via ` DESTDIR ` variable:
101101
102- ``` sudo
102+ ``` sh
103103sudo make install DESTDIR=/tmp/install-x973234/
104104```
105105
@@ -112,7 +112,7 @@ Older releases was using `DESTDIR` for a different purpose that is similar to `P
112112When making any changes to the gRPC API, you can use the installed ` protoc `
113113compiler to regenerate the API generated code packages with:
114114
115- ``` sudo
115+ ``` sh
116116make generate
117117```
118118
@@ -139,7 +139,7 @@ Please refer to [RUNC.md](/docs/RUNC.md) for the currently supported version of
139139
140140You can build static binaries by providing a few variables to ` make ` :
141141
142- ``` sudo
142+ ``` sh
143143make EXTRA_FLAGS=" -buildmode pie" \
144144 EXTRA_LDFLAGS=' -linkmode external -extldflags "-fno-PIC -static"' \
145145 BUILDTAGS=" netgo osusergo static_build"
@@ -153,12 +153,12 @@ make EXTRA_FLAGS="-buildmode pie" \
153153
154154The following instructions assume you are at the parent directory of containerd source directory.
155155
156- ## Build containerd
156+ ## Build containerd in a container
157157
158158You can build ` containerd ` via a Linux-based Docker container.
159159You can build an image from this ` Dockerfile ` :
160160
161- ```
161+ ``` dockerfile
162162FROM golang
163163
164164RUN apt-get update && \
@@ -180,10 +180,11 @@ This mounts `containerd` repository
180180You are now ready to [ build] ( #build-containerd ) :
181181
182182``` sh
183- make && make install
183+ make && make install
184184```
185185
186- ## Build containerd and runc
186+ ## Build containerd and runc in a container
187+
187188To have complete core container runtime, you will need both ` containerd ` and ` runc ` . It is possible to build both of these via Docker container.
188189
189190You can use ` git ` to checkout ` runc ` :
@@ -199,7 +200,6 @@ FROM golang
199200
200201RUN apt-get update && \
201202 apt-get install -y libbtrfs-dev libseccomp-dev
202-
203203```
204204
205205In our Docker container we will build ` runc ` build, which includes
@@ -268,6 +268,7 @@ go test -v -run . -test.root
268268```
269269
270270Example output from directly running ` go test ` to execute the ` TestContainerList ` test:
271+
271272``` sh
272273sudo go test -v -run " TestContainerList" . -test.root
273274INFO[0000] running tests against containerd revision=f2ae8a020a985a8d9862c9eb5ab66902c2888361 version=v1.0.0-beta.2-49-gf2ae8a0
0 commit comments