Commit Graph

1239 Commits

Author SHA1 Message Date
David Sheets
ac7316427c transfused: use read_exactly in init thread message reading
Signed-off-by: David Sheets <dsheets@docker.com>
2016-12-15 11:03:29 +00:00
David Sheets
fdc8afd32d transfused: factor read_exactly out of read_message
Signed-off-by: David Sheets <dsheets@docker.com>
2016-12-15 11:03:29 +00:00
David Sheets
8580cfec80 transfused: minor formatting fixup
Signed-off-by: David Sheets <dsheets@docker.com>
2016-12-15 11:03:29 +00:00
David Sheets
b9ff275a88 transfused: replace brittle init control message writing with write_exactly
Signed-off-by: David Sheets <dsheets@docker.com>
2016-12-15 11:03:29 +00:00
David Sheets
6cf50dd803 transfused: replace brittle event pid writing with write_exactly
Signed-off-by: David Sheets <dsheets@docker.com>
2016-12-15 11:03:29 +00:00
David Sheets
78328cf026 transfused: improve write_exactly error handling
Signed-off-by: David Sheets <dsheets@docker.com>
2016-12-15 11:03:29 +00:00
David Sheets
6b1ef63d79 transfused: improve read_message robustness
Signed-off-by: David Sheets <dsheets@docker.com>
2016-12-15 11:03:29 +00:00
Justin Cormack
470063b79b Merge pull request #888 from justincormack/cpio-container
Run cpio in a container
2016-12-14 19:15:01 -08:00
Justin Cormack
ade4d6cc4b 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
82ea5c0d90 Merge pull request #836 from justincormack/yama
Add Yama LSM
2016-12-14 17:49:27 -08:00
Justin Cormack
822e4df468 Add Yama LSM
Default config is restricted ptrace, processes can only ptrace
related processes, such as child processes, rather than any process
with the same uid.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-12-14 17:04:36 -08:00
Justin Cormack
88c3d98af4 Tweak kernel networking options
In 4.9 IPVLAN support needs NET_L3_MASTER_DEV to work.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-12-14 16:41:12 -08:00
Justin Cormack
75b0814221 Merge pull request #880 from justincormack/kernel-4.8-4.9
Make AUFS optional and ship choice of kernels
2016-12-14 15:33:39 -08:00
French Ben
d01892df11 Added simple upload of the image to bucket
Signed-off-by: French Ben <frenchben@docker.com>
2016-12-14 10:18:54 -08:00
Justin Cormack
3b774e3657 Make AUFS optional and ship choice of kernels
This seems the best option, although none are great

- build with `make AUFS=1` to build with AUFS support, currently with 4.8 kernel
- default is to build without AUFS support, with 4.9 kernel

This recognises that AUFS supprot is temporary #620 and only there until
we can phase it out on desktop editions, and allow the other editions that
never shipped with AUFS to ship something very close to mainline.

However we do still apply the patches so that the non AUFS branch runs fine on
all platforms, so it can be tested elsewhere.

We may be able to move the kernel versions back in line when 4.9 aufs support is out.

Plan is to shift CI to build both sets of images, and get the Desktop editions to
pick up the aufs set automatically, once this is merged.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-12-13 18:23:45 -08:00
Justin Cormack
e4c8845091 Merge pull request #874 from justincormack/gce-image
Build a GCE image
2016-12-13 16:57:48 -08:00
Justin Cormack
2c55470450 Merge pull request #877 from justincormack/swap-safety
Make sure we do not create a swap file if /var not mounted
2016-12-13 16:25:57 -08:00
Justin Cormack
7403c94ef4 Only default to experimental if dockerd supports it
This allows 1.12 engine to still be supported on master.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-12-13 14:45:13 -08:00
Justin Cormack
8575ea050c Make sure we do not create a swap file if /var not mounted
See #875

This will only happen if there has been some sort of error
before, but lets not make it worse.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-12-13 09:49:13 -08:00
Justin Cormack
9245dd656f 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
8ab9746203 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
4658a1a55c 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
7195763e66 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
Justin Cormack
73d0be9840 Merge pull request #865 from justincormack/scan-kernel
Kernel scanning now fixed, only needs vmlinuz64
2016-12-12 12:56:31 -08:00
Justin Cormack
d2bb1b9657 Merge pull request #866 from justincormack/mke2fs-options
Improve mkfs options
2016-12-12 11:22:20 -08:00
Justin Cormack
ad87c3b93b Update alpine-base
Updates ca-certificates to 20161130

Includes the 20161102 updates see http://metadata.ftp-master.debian.org/changelogs/main/c/ca-certificates/ca-certificates_20161130_changelog

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-12-12 10:45:10 -08:00
Justin Cormack
9fc867629f Improve mkfs options
- make quiet
- force, so some adjustments are not checked see https://github.com/docker/pinata/issues/6198
- set resize_inode as we do resize partitions on cloud and they could have very few inodes otherwise
- inline all the default options and remove the config file, so script is more standalone

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-12-12 10:36:49 -08:00
Justin Cormack
212e6f8545 Kernel scanning now fixed, only needs vmlinuz64
- The scanning process was not ignoring the kernel extraversion before,
so was only sometimes picking up issues.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-12-12 09:54:02 -08:00
Justin Cormack
2be21dcc78 Update to Linux 4.8.14
Includes fix for CVE-2016-8655 Linux af_packet.c race condition.

This gives a container escape with default container capabilities.

This now has the slow network namespace patch backported, so this
is removed.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-12-10 16:18:47 -08:00
Justin Cormack
a7f57526a5 Containerize test suite
- run test suite under containerd
- in future this should be converted to Go not shell see #860
- test suite is now in its own initrd, can be run on any platform not just qemu

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-12-09 17:13:16 -08:00
Riyaz Faizullabhoy
6db87549c4 Set CONFIG_LEGACY_VSYSCALL to NONE and vsyscall=emulate
Regenerated the kernel config from container, which bumped the kernel
version and included some other fixes.  Also bumps the check-config
container to check for VSYSCALL_NATIVE

Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2016-12-09 12:09:35 -08:00
Justin Cormack
f190512e2e Add some missing --rm in docker run
Some of these were missing, leaving strays around.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-12-09 09:08:22 -08:00
Justin Cormack
66ac858d2f Merge pull request #857 from justincormack/mksh-buildfix
Add Dockerfile into mksh image for hash calculation
2016-12-08 18:03:38 -08:00
Justin Cormack
e3eeadabb6 Merge pull request #853 from justincormack/alpine-build-kernel
Install kernel headers in kernel image and upload kernel for scans
2016-12-08 17:53:34 -08:00
Justin Cormack
e67de1bb6c Add Dockerfile into mksh image for hash calculation
Caused build errors without it.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-12-08 17:51:42 -08:00
Justin Cormack
5fb7594217 Keep kernel headers from build
Also upload some kernel artefacts to a private repo at mobylinux/kernel on Hub for scanning.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-12-08 17:32:59 -08:00
Justin Cormack
2598a33494 Merge pull request #855 from justincormack/mksh
Add base image for mksh
2016-12-08 17:27:14 -08:00
Justin Cormack
f7fcdc5776 Add base image for mksh
This is a minimal standalone statically linked shell for use
for now in converting images to containers.

Plan to phase it out and replace with actual programs later.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-12-08 15:58:51 -08:00
Nathan LeClaire
fbf1f435aa Bump Azure SHA for v.1.13.0-rc3-beta13
Signed-off-by: Nathan LeClaire <nathan.leclaire@gmail.com>
2016-12-08 12:37:08 -08:00
Riyaz Faizullabhoy
44a5cfb874 Change -1 to 1 in DOCKER_CONTENT_TRUST value
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2016-12-07 17:28:52 -08:00
Nathan LeClaire
949df4f11c Merge pull request #813 from FrenchBen/vendor-azure
Added docker image for VHD utils
2016-12-07 16:19:27 -08:00
Justin Cormack
7ef813e667 Merge pull request #851 from justincormack/push-image
Push a copy of the Moby base image to mobylinux/mobylinux
2016-12-07 13:58:49 -08:00
Justin Cormack
ba50adfc36 Push a copy of the Moby base image to mobylinux/mobylinux
This will be used for ongoing security scanning.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-12-07 12:10:39 -08:00
Riyaz Faizullabhoy
9284759f2c Disable kexec from kernel_config, revert sysctl config because key is now unknown
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2016-12-07 11:43:10 -08:00
Justin Cormack
5794640a04 Merge pull request #840 from riyazdf/kexec-load
Disable kexec load in sysctl config
2016-12-07 10:44:44 -08:00
Justin Cormack
1656e53324 Add some missing sha256 tags
These got missed in the previous commits.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-12-06 18:49:44 -08:00
Justin Cormack
085a2f7fbd Only TRIM on Mac if configured via database
Stops unnecessary log spam.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-12-06 08:50:45 -08:00
Justin Cormack
ccec51c2ca Typo in crontab
Its 15min not 15m

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-12-06 08:37:04 -08:00
David Scott
f570ef6dac Use TRIM on Mac as well as Windows
Previously we only ran `fstrim` on Windows. Docker for Mac now supports
TRIM so we should run `fstrim` there too.

Note it's possible to turn off TRIM on the Mac at the virtual hardware
level via the database, but this should be harmless -- the `fstrim`
fails immediately with an obvious error if the device doesn't support it:
`fstrim: ioctl 0xc0185879 failed: Not supported`.

Signed-off-by: David Scott <dave.scott@docker.com>
2016-12-06 12:03:26 +00:00
Justin Cormack
6d8925f012 Update Docker to 1.13.0-rc3
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-12-05 20:31:16 -08:00