BUILDING.md: markdown fixes
- correct language-hints on code-fences - fix duplicate titles, causing non-unique anchors Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
0bcd45d3a0
commit
42b57cc730
27
BUILDING.md
27
BUILDING.md
@ -32,9 +32,9 @@ git clone https://github.com/containerd/containerd
|
|||||||
|
|
||||||
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:
|
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:
|
||||||
|
|
||||||
```
|
```sh
|
||||||
$ wget -c https://github.com/protocolbuffers/protobuf/releases/download/v3.11.4/protoc-3.11.4-linux-x86_64.zip
|
wget -c https://github.com/protocolbuffers/protobuf/releases/download/v3.11.4/protoc-3.11.4-linux-x86_64.zip
|
||||||
$ sudo unzip protoc-3.11.4-linux-x86_64.zip -d /usr/local
|
sudo unzip protoc-3.11.4-linux-x86_64.zip -d /usr/local
|
||||||
```
|
```
|
||||||
|
|
||||||
`containerd` uses [Btrfs](https://en.wikipedia.org/wiki/Btrfs) it means that you
|
`containerd` uses [Btrfs](https://en.wikipedia.org/wiki/Btrfs) it means that you
|
||||||
@ -77,7 +77,7 @@ best results.
|
|||||||
`containerd` uses `make` to create a repeatable build flow. It means that you
|
`containerd` uses `make` to create a repeatable build flow. It means that you
|
||||||
can run:
|
can run:
|
||||||
|
|
||||||
```
|
```sh
|
||||||
cd containerd
|
cd containerd
|
||||||
make
|
make
|
||||||
```
|
```
|
||||||
@ -86,7 +86,7 @@ This is going to build all the project binaries in the `./bin/` directory.
|
|||||||
|
|
||||||
You can move them in your global path, `/usr/local/bin` with:
|
You can move them in your global path, `/usr/local/bin` with:
|
||||||
|
|
||||||
```sudo
|
```sh
|
||||||
sudo make install
|
sudo make install
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -99,7 +99,7 @@ Note: if you set one of these vars, set them to the same values on all make stag
|
|||||||
If you want to prepend an additional prefix on actual installation (eg. packaging or chroot install),
|
If you want to prepend an additional prefix on actual installation (eg. packaging or chroot install),
|
||||||
you can pass it via `DESTDIR` variable:
|
you can pass it via `DESTDIR` variable:
|
||||||
|
|
||||||
```sudo
|
```sh
|
||||||
sudo make install DESTDIR=/tmp/install-x973234/
|
sudo make install DESTDIR=/tmp/install-x973234/
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -112,7 +112,7 @@ Older releases was using `DESTDIR` for a different purpose that is similar to `P
|
|||||||
When making any changes to the gRPC API, you can use the installed `protoc`
|
When making any changes to the gRPC API, you can use the installed `protoc`
|
||||||
compiler to regenerate the API generated code packages with:
|
compiler to regenerate the API generated code packages with:
|
||||||
|
|
||||||
```sudo
|
```sh
|
||||||
make generate
|
make generate
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -139,7 +139,7 @@ Please refer to [RUNC.md](/docs/RUNC.md) for the currently supported version of
|
|||||||
|
|
||||||
You can build static binaries by providing a few variables to `make`:
|
You can build static binaries by providing a few variables to `make`:
|
||||||
|
|
||||||
```sudo
|
```sh
|
||||||
make EXTRA_FLAGS="-buildmode pie" \
|
make EXTRA_FLAGS="-buildmode pie" \
|
||||||
EXTRA_LDFLAGS='-linkmode external -extldflags "-fno-PIC -static"' \
|
EXTRA_LDFLAGS='-linkmode external -extldflags "-fno-PIC -static"' \
|
||||||
BUILDTAGS="netgo osusergo static_build"
|
BUILDTAGS="netgo osusergo static_build"
|
||||||
@ -153,12 +153,12 @@ make EXTRA_FLAGS="-buildmode pie" \
|
|||||||
|
|
||||||
The following instructions assume you are at the parent directory of containerd source directory.
|
The following instructions assume you are at the parent directory of containerd source directory.
|
||||||
|
|
||||||
## Build containerd
|
## Build containerd in a container
|
||||||
|
|
||||||
You can build `containerd` via a Linux-based Docker container.
|
You can build `containerd` via a Linux-based Docker container.
|
||||||
You can build an image from this `Dockerfile`:
|
You can build an image from this `Dockerfile`:
|
||||||
|
|
||||||
```
|
```dockerfile
|
||||||
FROM golang
|
FROM golang
|
||||||
|
|
||||||
RUN apt-get update && \
|
RUN apt-get update && \
|
||||||
@ -180,10 +180,11 @@ This mounts `containerd` repository
|
|||||||
You are now ready to [build](#build-containerd):
|
You are now ready to [build](#build-containerd):
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
make && make install
|
make && make install
|
||||||
```
|
```
|
||||||
|
|
||||||
## Build containerd and runc
|
## Build containerd and runc in a container
|
||||||
|
|
||||||
To have complete core container runtime, you will need both `containerd` and `runc`. It is possible to build both of these via Docker container.
|
To have complete core container runtime, you will need both `containerd` and `runc`. It is possible to build both of these via Docker container.
|
||||||
|
|
||||||
You can use `git` to checkout `runc`:
|
You can use `git` to checkout `runc`:
|
||||||
@ -199,7 +200,6 @@ FROM golang
|
|||||||
|
|
||||||
RUN apt-get update && \
|
RUN apt-get update && \
|
||||||
apt-get install -y libbtrfs-dev libseccomp-dev
|
apt-get install -y libbtrfs-dev libseccomp-dev
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
In our Docker container we will build `runc` build, which includes
|
In our Docker container we will build `runc` build, which includes
|
||||||
@ -268,6 +268,7 @@ go test -v -run . -test.root
|
|||||||
```
|
```
|
||||||
|
|
||||||
Example output from directly running `go test` to execute the `TestContainerList` test:
|
Example output from directly running `go test` to execute the `TestContainerList` test:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
sudo go test -v -run "TestContainerList" . -test.root
|
sudo go test -v -run "TestContainerList" . -test.root
|
||||||
INFO[0000] running tests against containerd revision=f2ae8a020a985a8d9862c9eb5ab66902c2888361 version=v1.0.0-beta.2-49-gf2ae8a0
|
INFO[0000] running tests against containerd revision=f2ae8a020a985a8d9862c9eb5ab66902c2888361 version=v1.0.0-beta.2-49-gf2ae8a0
|
||||||
|
Loading…
Reference in New Issue
Block a user