Skip to content

Commit 42b57cc

Browse files
committed
BUILDING.md: markdown fixes
- correct language-hints on code-fences - fix duplicate titles, causing non-unique anchors Signed-off-by: Sebastiaan van Stijn <[email protected]>
1 parent 0bcd45d commit 42b57cc

1 file changed

Lines changed: 14 additions & 13 deletions

File tree

BUILDING.md

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ git clone https://github.com/containerd/containerd
3232

3333
For 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
7878
can run:
7979

80-
```
80+
```sh
8181
cd containerd
8282
make
8383
```
@@ -86,7 +86,7 @@ This is going to build all the project binaries in the `./bin/` directory.
8686

8787
You can move them in your global path, `/usr/local/bin` with:
8888

89-
```sudo
89+
```sh
9090
sudo 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
9999
If you want to prepend an additional prefix on actual installation (eg. packaging or chroot install),
100100
you can pass it via `DESTDIR` variable:
101101

102-
```sudo
102+
```sh
103103
sudo 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
112112
When making any changes to the gRPC API, you can use the installed `protoc`
113113
compiler to regenerate the API generated code packages with:
114114

115-
```sudo
115+
```sh
116116
make generate
117117
```
118118

@@ -139,7 +139,7 @@ Please refer to [RUNC.md](/docs/RUNC.md) for the currently supported version of
139139

140140
You can build static binaries by providing a few variables to `make`:
141141

142-
```sudo
142+
```sh
143143
make 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

154154
The following instructions assume you are at the parent directory of containerd source directory.
155155

156-
## Build containerd
156+
## Build containerd in a container
157157

158158
You can build `containerd` via a Linux-based Docker container.
159159
You can build an image from this `Dockerfile`:
160160

161-
```
161+
```dockerfile
162162
FROM golang
163163

164164
RUN apt-get update && \
@@ -180,10 +180,11 @@ This mounts `containerd` repository
180180
You 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+
187188
To have complete core container runtime, you will need both `containerd` and `runc`. It is possible to build both of these via Docker container.
188189

189190
You can use `git` to checkout `runc`:
@@ -199,7 +200,6 @@ FROM golang
199200

200201
RUN apt-get update && \
201202
apt-get install -y libbtrfs-dev libseccomp-dev
202-
203203
```
204204

205205
In our Docker container we will build `runc` build, which includes
@@ -268,6 +268,7 @@ go test -v -run . -test.root
268268
```
269269

270270
Example output from directly running `go test` to execute the `TestContainerList` test:
271+
271272
```sh
272273
sudo go test -v -run "TestContainerList" . -test.root
273274
INFO[0000] running tests against containerd revision=f2ae8a020a985a8d9862c9eb5ab66902c2888361 version=v1.0.0-beta.2-49-gf2ae8a0

0 commit comments

Comments
 (0)