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>
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>
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>
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>
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>
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>
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>
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>
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>
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>