Commit Graph

113 Commits

Author SHA1 Message Date
Justin Cormack
7cf47d42f4 Use buildmode pie for Go code
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-01-17 16:03:50 +00:00
Justin Cormack
a1d0f31c7d Use Alpine for qemu-static
Static qemu-user is now available in Alpine edge. Includes the
patch for Golang crashing due to non standard signal usage.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-01-17 15:37:31 +00:00
Justin Cormack
c59249b54d Merge pull request #1033 from justincormack/untar-hashes
Do not use tar to make hashes
2017-01-17 15:21:23 +00:00
Justin Cormack
07e339ed6b Merge pull request #1034 from justincormack/test-container
Build test container from a Docker container
2017-01-17 14:57:03 +00:00
Justin Cormack
6a6f03db30 Do not use tar to make hashes
As it includes timestanps in the tarball it does not make a stable
hash; use contents of the files instead.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-01-17 14:28:23 +00:00
Justin Cormack
d4683bb112 Merge pull request #1032 from justincormack/sha-hash
Use hash for sha image, otherwise requires network access for build
2017-01-17 14:25:52 +00:00
Justin Cormack
e28a21e7a7 Build test container from a Docker container
Corresponds to #1030 but for test container

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-01-17 14:24:57 +00:00
Justin Cormack
ddab0a9448 Use hash for sha image, otherwise requires network access for build
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-01-17 13:36:09 +00:00
Justin Cormack
314c318685 Merge pull request #1030 from justincormack/build-containers
Build containerd containers from Docker containers
2017-01-17 13:24:58 +00:00
Justin Cormack
7ae11bc5d4 Build containerd containers from Docker containers
Simplifies the build process, and makes testing easier as there is a
Docker container you can run to test things.

Replaces #994

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-01-17 12:29:55 +00:00
Riyaz Faizullabhoy
f8c8c13655 Merge pull request #1021 from justincormack/c-compile
Use docker run to compile C code not docker build
2017-01-16 17:44:47 +00:00
Justin Cormack
ab494d21e0 Clean up go-compile
- remove unused `--docker` option
- neater output for stages of check, build

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-01-15 19:43:03 +00:00
Justin Cormack
d3abdc6252 Use docker run to compile C code not docker build
C version of #1006

Note that I switched all the C builds to use -O2 and that meant
that the compiler found some more warnings so I also fixed these
up. The possibly undefined ones were harmless, the aliasing one
is now more correct.

As these are small programs, the caching from `docker build` makes
no real difference, and worst case compile time is much better.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-01-15 15:55:14 +00:00
Justin Cormack
d054aba9c5 Merge pull request #1020 from justincormack/toybox-clean
Clean up build to not use alpine-build-c where not needed
2017-01-15 15:23:37 +00:00
Justin Cormack
04902fd1c8 Clean up build to not use alpine-build-c where not needed
Makes updates simpler.

Makes it explicit that `perf` currently requires Alpine 3.4, and update kernel version.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-01-15 14:07:46 +00:00
Justin Cormack
50215b9c6c Update to golang:1.7-alpine3.5 images
Now there is an Alpine 3.5 variant of the Go 1.7 images, use this.

fix #972

Note updated the containers/binfmt image as this will be converted
to go-compile shortly, at which point alpine-build-go can be removed.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-01-14 09:41:12 +00:00
Justin Cormack
8585ddab9b Less verbose kernel config test
As `grep` echoes the output, no need to have `set -x` on this script,
make output smaller and cleaner.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-01-14 00:09:50 +00:00
Justin Cormack
4720fc2af7 Merge pull request #1006 from justincormack/go-compile
Compile Go code with docker run not docker build
2017-01-13 19:15:22 +00:00
Justin Cormack
38819dbd72 Merge pull request #1008 from justincormack/ocaml-hub
Build OCaml iptables package once and push to hub
2017-01-13 19:15:07 +00:00
Justin Cormack
0915940369 Build OCaml iptables package once and push to hub
As the build requires networking, is non repeatable as dependencies
may change, makes sense to make it a static package for now.

Plan is to rewrite in Go anyway at some point see #467

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-01-13 16:36:03 +00:00
Justin Cormack
5143cef148 Compile Go code with docker run not docker build
Go code is really fast to compile so we do not really need to use the
cache features of `docker build`. So make a compile container instead.
This can also output a build context and Dockerfile if you want to do
a build.

For reference, an uncached `docker build` of our Go code takes about
7s, a cached one 1.2s, and this takes 1.7s, so the best case is a little
worse, but we save a lot of images, and the worst case is better.

This is mainly designed to make the nested builds for containerd
containers simpler too. Will add a variant for the C code as well.

Also add `-static` to the flags so we always make static executables,
which was omitted previously.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-01-13 15:49:51 +00:00
Justin Cormack
23cb00d6c3 Fix Makefile deps
Just noticed this while copying it for another build.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-01-13 13:16:32 +00:00
Justin Cormack
cb44fd12cd Merge pull request #987 from justincormack/reinstate-4.4
Reinstate 4.4 support
2017-01-12 11:18:14 +00:00
Justin Cormack
ea612505f6 Adjust kernel config tests to support 4.4
- some options are different

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-01-11 17:35:25 +00:00
Justin Cormack
6e82b2ad54 Use riddler to generate config.json
- use jq to fix up the output where there are still issues
- some issues will need fixing up in future too
- can remove fixes later
- still plan to restructure the code around containers to make it easier and clearer

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-01-10 22:03:13 +00:00
Justin Cormack
d316fa9597 Remove some pushes to :latest
Missed these before, noticed while making a new one.

Also a copy paste error left one shasum incorrect.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-01-10 17:34:24 +00:00
Justin Cormack
3a93ad8013 Update bcc
- remove patch now https://github.com/iovisor/bcc/pull/887 is merged
- move the patches to the base image as it makes more sense like this

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-01-10 13:33:00 +00:00
Justin Cormack
05618deeb4 Simplify base images
Some of the builds do not need to depend on docker-build-c, makes
update a bit simpler.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-01-09 15:37:54 +00:00
Rolf Neugebauer
3a9009a6e7 ebpf: fix ebpf compile error
Some/most of the samples/tools throw and error, e.g.:
LLVM ERROR: Cannot select: 0x56049b79dcb0: ch,glue = BPFISD::CALL 0x56049a93ad60, TargetExternalSymbol:i64'__stack_chk_fail'
  0x56049b391500: i64 = TargetExternalSymbol'__stack_chk_fail'
  In function: waker

bcc-stack-protector.patch adds -fno-stack-protector to the CFLAGS
which fixes this error.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-01-06 18:06:05 +00:00
Rolf Neugebauer
fa1a55ae03 ebpf: set LD_LIBRARY_PATH in container
This is needed for the python tools to find libbcc.so

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-01-06 16:49:38 +00:00
Riyaz Faizullabhoy
97040931c3 Set CONFIG_UBSAN, add to grep test
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2017-01-05 09:03:21 -08:00
Justin Cormack
0f018a4f20 Merge pull request #945 from justincormack/ebpf-container
Add a development eBPF container build
2017-01-05 15:07:14 +00:00
Justin Cormack
ee7f24defd Add a development eBPF container build
See `docs/ebpf.md` for how to use. This is built by CI or you can build
manually if you customise the kernel.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-01-05 11:59:28 +00:00
Riyaz Faizullabhoy
bcebb47868 Kernel config grep test
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2017-01-04 09:44:17 -08:00
Justin Cormack
9cab656fc8 Merge pull request #932 from justincormack/alpine-3.5
Update base images to Alpine 3.5
2016-12-28 19:58:59 +00:00
Justin Cormack
00b3924067 Update base images to Alpine 3.5
excludes
- Go base images as not yet available
- perf which does not build with latest image

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-12-28 18:09:08 +00:00
Justin Cormack
afe0df0566 Update base image to Alpine 3.5 official image
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-12-27 19:02:29 +00:00
David Gageot
77bc577875 Flag GCP platform
Signed-off-by: David Gageot <david@gageot.net>
2016-12-22 18:42:15 +01:00
Justin Cormack
cab1767a27 Merge pull request #915 from riyazdf/golinting
Add golint, gofmt, govet
2016-12-21 19:35:31 +00:00
Riyaz Faizullabhoy
6245780591 Move linting to Go build
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2016-12-21 11:26:33 -08:00
Riyaz Faizullabhoy
0736e139d2 Add lint docker image for golang linting and testing to individual package subdirs
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2016-12-20 15:00:08 -08:00
Justin Cormack
9d1c84fd9d Update Alpine base image
Security update

- openssh 7.4

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-12-19 18:04:42 +00:00
Rolf Neugebauer
67e0a98cc2 alpine: add Makefile/Dockerfile to build the Linux perf utility
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2016-12-16 17:04:43 +00:00
Rolf Neugebauer
a8aa81a228 base: add dependencies to build the Linux perf utility
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2016-12-16 15:10:52 +00:00
Justin Cormack
9edf3a2d8c Update base image
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-12-15 13:22:11 -08:00
Justin Cormack
f339c70f1a Run cpio in a container
This way it runs as root so files always owned by root.

Fix #887

This is the simplest fix for 1.13, we can also use this for
creating the main system initrd, but that needs more changes
so leaving for 1.14.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-12-14 17:56:57 -08:00
Justin Cormack
f1f2f1b222 Build a GCE image
- this is a raw 1GB filesystem image with syslinux for booting
- built with libguestfs so does not need any privileges
- need not be built on GCE
- there is a target that runs the image in qemu for local tests

Does not yet have a script to upload the image to cloud storage or create image from it.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-12-12 19:17:24 -08:00
Justin Cormack
ff48dd50a2 Rename the bios build image to mkimage-iso-bios
About to add more images so use a consistent naming scheme.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-12-12 15:53:44 -08:00
Justin Cormack
d7d957a59f Force Debian installs to never prompt the user
Sometimes Debian just wants to ask you questions on an install,
this is really not a useful behaviour when there is no one
attached to the process.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-12-12 15:31:57 -08:00
Justin Cormack
6acee5984e Use an image to pad initrd files to 4 bytes
This saves a lot of duplicated nasty Makefile code, means and generally
cleans things up.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-12-12 14:12:13 -08:00