Commit Graph

57 Commits

Author SHA1 Message Date
Samruddhi Khandale
50b576a94e Adds a dev container and Codespaces docs
Signed-off-by: Samruddhi Khandale <samruddhikhandale@github.com>
2023-03-22 19:28:44 +00:00
Akihiro Suda
86fc1ccab4
Remove aufs snapshotter (deprecated since v1.5)
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-03-14 14:37:13 +09:00
Maksym Pavlenko
dd423e96f2
Merge pull request #8115 from bennett-white/Add-macos-note
Add macOS build note
2023-02-20 15:14:26 -08:00
Bennett-White
dc27cc0a2a Add macOS build notes
Co-authored-by: AkihiroSuda <suda.kyoto@gmail.com>
Co-authored-by: Mike Brown <brownwm@us.ibm.com>
Signed-off-by: Bennett White <59664869+bennett-white@users.noreply.github.com>
2023-02-17 11:52:09 -05:00
Akihiro Suda
90d004ae8c
Go 1.20.1
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-02-16 03:50:23 +09:00
Akihiro Suda
52f82acb7b
btrfs: depend on kernel UAPI instead of libbtrfs
See containerd/btrfs PR 40 and moby/moby PR 44761. (Thanks to [@]neersighted.)

The containerd/btrfs library now requires headers from kernel 4.12 or newer:
- https://github.com/torvalds/linux/blob/master/include/uapi/linux/btrfs.h
- https://github.com/torvalds/linux/blob/master/include/uapi/linux/btrfs_tree.h

These files are licensed under the GPL-2.0 WITH Linux-syscall-note, so it should be compatible with the Apache License 2.0.
https://spdx.org/licenses/Linux-syscall-note.html

The dependency on the kernel headers only affects users building from source.
Users on older kernels may opt to not compile this library (`BUILDTAGS=no_btfs`),
or to provide headers from a newer kernel.

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-02-10 10:07:34 +09:00
yanggang
438db09b07
Fix building.md for btrfs
Signed-off-by: yanggang <gang.yang@daocloud.io>
2022-11-19 06:52:42 +08:00
Phil Estes
47fa603e1c
Update required Go version in BUILDING.md
Our main branch no longer builds successfully with Go 1.17.

Signed-off-by: Phil Estes <estesp@amazon.com>
2022-10-17 12:45:12 -04:00
Kazuyoshi Kato
00eb74a4ca Make building static binaries simpler
This commit adds STATIC makefile variable to adjust LDFLAGS and build
tags accordingly.

Fixes #5824.

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2022-06-04 03:34:41 +00:00
SilverSoldier
f7aa90d273 Fix containerd-stress duration flag
Signed-off-by: Kavya G <soldatargent@gmail.com>
2022-06-01 10:47:18 +05:30
Akihiro Suda
a2d22ac057
BUILDING.md: update supported Go versions
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2022-04-01 18:22:00 +09:00
Jordan Karaze
cf571fa968 added make help for cri integration
Signed-off-by: Jordan Karaze <jordan.karaze@ibm.com>
2022-03-28 16:44:12 -05:00
Mete Durlu
dea7ae27a9 Add instructions on using go with admin perms
For testing and possibly other operations go might need elevated
permissions. Some parts of documentation and the BUILDING.md mention
using `sudo go` but does not explain how to achieve this. This commit
inserts instructions to the BUILDING.md as a small note. Note mentions
systemwide and local solutions.

Signed-off-by: Mete Durlu <mete.durlu@ibm.com>
2022-02-10 16:35:42 +01:00
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