Commit Graph

44 Commits

Author SHA1 Message Date
Sebastiaan van Stijn
9cc179aa77
BUILDING.md: remove some bits about building runc
Refer users to runc's documentation instead of duplicating
the instructions.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-08-10 09:31:02 +02:00
Sebastiaan van Stijn
42b57cc730
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>
2021-08-10 09:27:50 +02:00
Kazuyoshi Kato
a5468852f8 docs: list all snapshotter-related build flags
We can disable most of snapshotters, but they are not documented.

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2021-08-09 16:33:06 -07:00
Cody Roseborough
3a8622e309 Updates the location of protobuf downloads in docs
Signed-off-by: Cody Roseborough <cdr@amazon.com>
2021-07-28 17:40:34 +00:00
Enrico Weigelt, metux IT consult
b5f530a157 Makefile: fix DESTDIR environment variable behaviour
The DESTDIR environment variable is used in the wrong way: since 30+ years
it's common practise using it for specifying *temporary* target *root*
(where eg. packaging infrastructure picks up the install image), instead
of the installation *prefix* on the final target.

Fixing this by introducing PREFIX variable (with default /usr/local) and
using both variables according to the 30 years matured common practise.
That way, distro packagers and other standardized build/installation
systems can easily do correct deployments w/o individual hacks.

changes v2: removed variables not used yet
            added documentation

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2021-06-01 10:49:25 +02:00
Sebastiaan van Stijn
8325ba5d36
Separate runc binary version from libcontainer version
Now that the dependency on runc (libcontaienr) code has been reduced
considerably, it is probbaly ok to cut the version dependency between
libcontainer and the runc binary that is supported.

This patch separates the runc binary version from the version of
libcontainer that is defined in go.mod, and updates the documentation
accordingly.

The RUNC_COMMIT variable in the install-runc script is renamed to
RUNC_VERSION to encourage using tagged versions, and the Dockerfile
in contrib is updated to allow building with a custom version.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-03-10 13:41:12 +01:00
Sebastiaan van Stijn
b89a63a235
Remove references to apparmor and selinux buildtags for runc
From the runc v1.0.0-rc93 release notes:

> The "selinux" and "apparmor" buildtags have been removed, and now all runc
> builds will have SELinux and AppArmor support enabled. Note that "seccomp"
> is still optional (though we very highly recommend you enable it).

Also adding a note about kmem support.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-03-10 12:16:54 +01:00
Iceber Gu
46fd9e440b
update BUILDMING.md
Signed-off-by: Iceber Gu <wei.cai-nat@daocloud.io>
2021-03-03 09:43:52 +08:00
Derek McGowan
7dffdfa560
Move documentation and helper directories out of root
Signed-off-by: Derek McGowan <derek@mcg.dev>
2021-01-12 12:19:50 -08:00
Shengjing Zhu
454e540330 docs: Tweak installing btrfs dependency on Debian/Ubuntu
Signed-off-by: Shengjing Zhu <zhsj@debian.org>
2020-12-22 13:22:16 +08:00
Shengjing Zhu
13917b03dc docs: Update command in BUILDING after moving to go modules
Signed-off-by: Shengjing Zhu <zhsj@debian.org>
2020-12-22 13:22:16 +08:00
Akihiro Suda
7e6e4c466f
remove "selinux" build tag
The build tag was removed in go-selinux v1.8.0: opencontainers/selinux#132

Related: remove "apparmor" build tag: 0a9147f3aa

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2020-12-15 20:05:25 +09:00
Akihiro Suda
0a9147f3aa
remove "apparmor" build tag
The "apparmor" build tag does not have any cgo dependency and can be removed safely.

Related: https://github.com/opencontainers/runc/issues/2704

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2020-12-08 19:22:39 +09:00
mc256
60d24c4a95
Update BUILDING.md - add dependency libseccomp-dev
I got these errors when I try to build containerd:

```
go build "-mod=vendor" "-buildmode=pie"  -tags "seccomp selinux apparmor" -ldflags "-X main.gitCommit="a220b9c6cc100f71ddc67152a12fc04622313dca" -X main.version=1.0.0-rc92+dev " -o runc .
Package libseccomp was not found in the pkg-config search path.
Perhaps you should add the directory containing `libseccomp.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libseccomp' found
Package libseccomp was not found in the pkg-config search path.
Perhaps you should add the directory containing `libseccomp.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libseccomp' found
pkg-config: exit status 1
```

Solved this problem by installing one extra dependency `libseccomp-dev`. I am using Ubuntu 20.04 and everything works well!

See also: opencontainers/runc#1032

Signed-off-by: Jun Lin Chen <webmaster@mc256.com>
2020-10-01 10:59:35 -04:00
Akihiro Suda
43cbdf89e9
BUILDING.md: fix description about static builds
* `-linkmode external` is required since Go 1.15 for static builds: https://github.com/golang/go/issues/40711
* Clarify the meaning of "loading plugins"

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2020-08-12 18:39:48 +09:00
Akihiro Suda
6988b4d640
remove seccomp buildtag
The cgo dependency on libseccomp was removed in containerd/cri#1548.

The `seccomp` build tag is now ignored (and the seccomp support is always built-in).

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2020-07-31 14:41:41 +09:00
Murat
d47c0392df Updating build doc to require Go 1.13
Signed-off-by: Murat Kilic <murat.kilic@gmail.com>
2020-07-08 22:42:19 -04:00
Davanum Srinivas
7a252f3ca1
Build runc with selinux support
docker-ce seems to be building runc with selinux support, let us follow
the same pattern here please:
https://github.com/docker/docker-ce/search?p=1&q=RUNC_BUILDTAGS&unscoped_q=RUNC_BUILDTAGS

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2020-04-14 15:24:31 -04:00
Brian Goff
c1a218195d Add docs for build tags used by cri.
Since CRI is compiled in with containerd, builders should be aware that
these buildtags are available.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2020-03-27 11:42:16 -07:00
SaiHarshaK
cad67b73f2
Update btrfs dependencies in docs for debian buster and ubuntu 19.10
* Fixes: #4090

Signed-off-by: Sai Harsha Kottapalli  <k.saiharsha7@gmail.com>
2020-03-09 20:57:15 +05:30
Akihiro Suda
8e448bb279 vendor protobuf & grpc
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2020-02-26 10:57:05 +09:00
Daniel Bevenius
caeacfce34 Correct grammar/typo in BUILDING.MD
Signed-off-by: Daniel Bevenius <daniel.bevenius@gmail.com>
2019-12-10 12:19:51 +01:00
Alex Price
f92470b3eb Fix dependency in BUILDING.md
This commit fixes the btrfs dependency in the
"Build containerd and runc" section of BUILDING.md needed
for building containerd. btrfs/ioctl.h is now contained in
libbtrfs-dev.

Fixes #3865

Signed-off-by: Alex Price <aprice@atlassian.com>
2019-12-03 11:09:45 +11:00
unknown
a647407ca0 Fix dependency in BUILDING.md
btrfs/ioctl.h is now included in libbtrfs-dev instead of btrfs-tools.
Update BUILDING.md Dockerfile to install the correct dependency.

Resolves: #3813

Signed-off-by: Reid Li <reid.li@utexas.edu>
2019-11-09 12:22:53 -06:00
Michael Crosby
e7b6fea572
Merge pull request #3022 from mxpv/devmapper
Integrate device mapper snapshotter
2019-03-29 00:06:11 -04:00
Maksym Pavlenko
1e893b19ce
devmapper: add no_devmapper build tag
Signed-off-by: Maksym Pavlenko <makpav@amazon.com>
2019-03-07 10:53:19 -08:00
Li Yuxuan
4d2a26d751 BUILDING.md: update testing section
The integration-parallel has been removed by
4df7075a74.
Update Makefile targets in BUILDING.md.

Signed-off-by: Li Yuxuan <liyuxuan04@baidu.com>
2019-03-06 18:56:14 +08:00
Nitesh Konkar
6629f853a7 BUILDING: update BUILDING.md
Improve documentation

Signed-off-by: Nitesh Konkar <niteshkonkar@in.ibm.com>
2019-01-30 18:40:27 +05:30
Bingshen Wang
581a63ce4e Add build requirement doc on fedora/centos
Signed-off-by: bingshen.wbs <bingshen.wbs@alibaba-inc.com>
2018-11-16 18:53:15 +08:00
liaoj
67849c4714 fix typo
fix typo

Signed-off-by: jliao <jliao@alauda.io>
2018-09-07 15:35:57 +08:00
Kir Kolyshkin
48570b39c5 BUILDING.md: add osusergo for static build
Go 1.11 includes a fix to os/user to be working in a static binary
(fixing https://github.com/golang/go/issues/23265). The fix requires
`osusergo` build tag to be set for static binaries, which is what
this commit documents.

[v2: sort tags alphabetically]

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2018-07-19 12:32:15 +03:00
Stephen Day
a5e0916aa9
build: include instructions for runc build
Including some build information about runc that has been helpful in my
development environment. This should allow one to build and install runc
next to containerd so that both can be worked on simultaneously.

Signed-off-by: Stephen Day <stephen.day@getcruise.com>
2018-07-12 15:55:52 -07:00
Harshal Patil
ef449aa38e Docs: Fix incomplete instructions for building using docker
Fixes: #2396

Signed-off-by: Harshal Patil <harshal.patil@in.ibm.com>
2018-06-13 13:38:57 +05:30
Tobias Klauser
a74903a307 Drop libapparmor dependency from runc build docs
As of opencontainers/runc@db093f621f runc
no longer depends on libapparmor thus libapparmor-dev no longer needs to
be installed to build it. Adjust the documentation accordingly.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2018-03-29 09:18:45 +02:00
Phil Estes
6aa612dfc2
Update recommended versions to Go 1.10
To match build requirements for containerd now that we are using 1.10.

Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com>
2018-02-27 16:50:12 -08:00
Lantao Liu
809a99a39e Vendor cri plugin and add critest
Signed-off-by: Lantao Liu <lantaol@google.com>
2018-02-16 23:23:47 +00:00
Kir Kolyshkin
efc5df5773 BUILDING.md: add netgo for static build
When compiling containerd binaries statically, linker rightfully
complains:

```
+ make BUILDTAGS=static_build 'EXTRA_FLAGS=-buildmode pie'
'EXTRA_LDFLAGS=-extldflags "-fno-PIC -static"'
🇩 bin/ctr
/tmp/go-link-343047789/000000.o: In function
`_cgo_b0c710f30cfd_C2func_getaddrinfo':
/tmp/go-build/net/_obj/cgo-gcc-prolog:46: warning: Using 'getaddrinfo'
in statically linked applications requires at runtime the shared
libraries from the glibc version used for linking
```

The same error appears for ctr, containerd, and containerd-stress
binaries.

The fix is to use Go's own DNS resolver functions, rather than
glibc's getaddrinfo() -- this option is turned on by `netgo` build
tag.

See https://golang.org/pkg/net/ (look for "Name Resolution") for
more details.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2017-12-19 18:16:45 -08:00
Jess Valarezo
b284da3175 docs: update BUILDING and README
Signed-off-by: Jess Valarezo <valarezo.jessica@gmail.com>
2017-12-04 20:02:18 -08:00
Kir Kolyshkin
0d682e24a1 plugins: don't compile for static build
We can't really use `dlopen()` from a statically built binary, so
let's disable this functionality if `static_build` tag is used
(which is sort of a de-facto standard way of doing it).

This eliminates the following warning:

	🇩 bin/containerd
	# github.com/containerd/containerd/cmd/containerd
	/tmp/go-link-509179974/000004.o: In function `pluginOpen':
	/usr/local/go/src/plugin/plugin_dlopen.go:19: warning: Using 'dlopen' in
	statically linked applications requires at runtime the shared libraries
	from the glibc version used for linking

[v2: add static build instructions to BUILDING.md]

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2017-11-28 21:29:09 -08:00
Phil Estes
43ec3df34b
Add testing information to BUILDING.md
Add more detail on how to test containerd with `Makefile` targets,
`containerd-stress`, and external projects like `bucketbench`.

Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com>
2017-10-21 15:36:06 -04:00
Ian Campbell
680bab8468 Update docs with go 1.9 requirement.
re: #1632

The comment about plugins in README.md didn't seem relevant any longer so I
removed it.

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2017-10-12 15:06:36 +01:00
Jess Valarezo
d8abb61bed Update building doc for Docker for Mac users
Signed-off-by: Jess Valarezo <valarezo.jessica@gmail.com>
2017-08-17 10:21:03 -07:00
Jovi Zhangwei
50c84c4d43 Claim Go 1.8.x version requirement in BUILDING.md
Signed-off-by: Jovi Zhangwei <zw.xianwei@alibaba-inc.com>
2017-07-19 02:50:28 -04:00
Gianluca Arbezzano
254a95caad
Added build doc
This commit added a build chapter into the doc to explain how to compile
`containerd` binaries via Docker container.

I did that after a discussion on Slack. For some reason in my Ubuntu
16.10 I am not able to build containerd. It's probably some trick mess
that I created (I am super powerful on these things).o

But it can be useful for other people like me!

Signed-off-by: Gianluca Arbezzano <gianarb92@gmail.com>
2017-05-26 10:56:44 +02:00