Commit Graph

2442 Commits

Author SHA1 Message Date
Riyaz Faizullabhoy
1a9688c489 WireGuard: kernel config option to build in
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2017-03-17 13:38:57 +00:00
Riyaz Faizullabhoy
0651acd4f4 WireGuard: patch kernel to add it instead of out-of-tree module
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2017-03-17 13:38:56 +00:00
Justin Cormack
2cb4d1d096 Merge pull request #1323 from justincormack/gcp-metadata
Add a metadata handler for GCP which allows ssh login
2017-03-16 19:24:43 +00:00
Justin Cormack
59a652a8db Merge pull request #1324 from justincormack/no-apk
Clean up apk cache in init
2017-03-16 19:22:14 +00:00
Justin Cormack
43bbb06a81 Clean up apk cache in init
See #1312

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-03-16 19:14:08 +00:00
Justin Cormack
a66a537164 Add a metadata handler for GCP which allows ssh login
- this needs improvements to make it more "platform native", in
  particular GCP supports multiple users and more ssh key mangement
  options.
- at present you can login as root with any platform ssh key
- add support for uts=host and ipc=host
- set the hostname from the metadata as well

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-03-16 18:45:44 +00:00
Justin Cormack
f53387927c Merge pull request #1319 from justincormack/gcp-delimage
GCP image handling enhancements
2017-03-16 13:29:45 +00:00
Justin Cormack
7c6f18c4fe GCP image handling enhancements
- the `public` option was not previously implemented
- add `replace` only for GCP images which will error otherwise. Only
  recommended for use in development, in production use the `--name` option
  to provide a different name eaxch time. Note only applies to GCP images,
  will document these options properly soon.
- add a `family` option; this allows you to upload many images and the
  user can select the latest using the `family` option instead of a specific
  image.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-03-16 13:20:21 +00:00
Justin Cormack
fc7cac9d21 Merge pull request #1318 from justincormack/set-name
Add a --name cli option to the moby tool
2017-03-16 11:56:09 +00:00
Justin Cormack
6940edcfd2 Add a --name cli option to the moby tool
This sets the base name of the built images which otherwise
defaults to the basename of your yaml file. This allows
building different versions easily eg adding git sha to the
output names.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-03-16 11:51:49 +00:00
Justin Cormack
133f259da2 Merge pull request #1314 from avsm/kernel-docs
Update Kernel README
2017-03-15 18:49:58 +00:00
Anil Madhavapeddy
980a4efaed docs: More updates to the kernel README
Signed-off-by: Anil Madhavapeddy <anil@docker.com>
2017-03-15 17:26:47 +00:00
Justin Cormack
784eaccdb5 Merge pull request #1315 from justincormack/hyperkit-commands
Make the hyperkit script try harder to find executables
2017-03-15 16:22:04 +00:00
Justin Cormack
ab02321f51 Make the hyperkit script try harder to find executables
Currently if you just do `make` the hyperkit executables won't get
put in `bin/`, so try to extract from OSX.

This is temporary until get a better runner, but makes it nicer after `make clean`.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-03-15 16:03:25 +00:00
Anil Madhavapeddy
63c48df86a docs: Update kernel/README to point to ../docs
Signed-off-by: Anil Madhavapeddy <anil@docker.com>
2017-03-15 15:24:57 +00:00
Anil Madhavapeddy
4ad3fb3408 docs: moby/alpine/kernel/ is now just moby/kernel/
Signed-off-by: Anil Madhavapeddy <anil@docker.com>
2017-03-15 15:14:56 +00:00
Justin Cormack
cab929d4ba Merge pull request #1313 from justincormack/hyperkit-cli
Make the hyperkit script get the kernel command line if just passed a name
2017-03-15 15:14:04 +00:00
Justin Cormack
a13cbba51f Merge pull request #1311 from rneugeba/kbuild
kernel: Make 'tag' the default target
2017-03-15 15:13:53 +00:00
Justin Cormack
c4b910f80c Make the hyperkit script get the kernel command line if just passed a name
This is all slightly annoying, maybe we should make a file for the CLI for
hyperkit, but this is better and fixes a bug that the test CLI was coming from moby,
and is easier to use with custom builds.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-03-15 15:01:47 +00:00
Rolf Neugebauer
9a6fddfc78 kernel: Make 'tag' the default target
This is a stop-gap to prevent accidental push of kernel
images to hub until we sort out doing this from CI.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-03-15 14:31:27 +00:00
Justin Cormack
7018d4321c Merge pull request #1309 from avsm/add-igb-drivers
kernel: add igb and ixgb drivers
2017-03-15 14:23:06 +00:00
Justin Cormack
dc02e9588b Merge pull request #1306 from riyazdf/separate-container-logs
logs: separate daemon container logs into separate files
2017-03-15 14:22:41 +00:00
Justin Cormack
d8d6a851cd Merge pull request #1307 from ijc25/isoefi-autosize
tools: Calculate EFI ESP FAT FS size based on contents.
2017-03-15 14:22:20 +00:00
Anil Madhavapeddy
a3c8c3ce3b kernel: add igb and ixgb drivers, with vf variants
This lets us boot on packet.net machines and successfully gives
a DHCP lease when installed via iPXE.  See #1245

Signed-off-by: Anil Madhavapeddy <anil@docker.com>
2017-03-15 14:13:54 +00:00
Ian Campbell
f16ee76f57 tools: Calculate EFI ESP FAT FS size based on contents.
This requires switching to the dosfstools from alpine:edge since neither the
busybox nor alpine:3.5 dosfstools supports the -C option (in fact alpine:3.5
only has mkfs.fat and not mkfs.vfat).

The 511k slack seems like a lot to me, but 256k was somehow not enough.

Fixes #1304.

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2017-03-15 13:30:20 +00:00
Riyaz Faizullabhoy
f72a5693b5 logs: separate daemon container logs into separate files
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2017-03-15 12:24:10 +00:00
Justin Cormack
0032491117 Merge pull request #1305 from rneugeba/kern-up
Update kernels to 4.9.15/4.4.54
2017-03-15 11:39:46 +00:00
Justin Cormack
73abdeffc1 Merge pull request #1301 from riyazdf/readonly-check-container
Read-only check container for testing, clean up error output
2017-03-15 11:15:53 +00:00
Rolf Neugebauer
f3afa8f7e1 docs: fix a few snags in the kernel patch documentation
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-03-15 10:46:22 +00:00
Rolf Neugebauer
c7c893c883 kernel: Update kernels to 4.9.15/4.4.54
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-03-15 10:32:24 +00:00
Riyaz Faizullabhoy
7af8fefd40 read-only check container for testing, clean up error output
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2017-03-14 17:08:07 +00:00
Justin Cormack
1e708c8ca6 Merge pull request #1299 from justincormack/gcp
Add upload to Google Cloud Storage and Google Compute Image creation
2017-03-14 14:55:16 +00:00
Justin Cormack
51af32d11d Add upload to Google Cloud Storage and Google Compute Image creation
- the image upload uses the cloud API
- currently auth and image creation need the `gcloud` CLI tool.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-03-14 14:45:05 +00:00
Justin Cormack
c37a921ab6 Merge pull request #1295 from rneugeba/kernel
Update the kernel build system
2017-03-14 12:18:39 +00:00
Rolf Neugebauer
ba7f6c7a84 kernel: Update YAML files with new kernel images
Use the 4.9.x (aka latest) in all files

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-03-14 10:54:44 +00:00
Rolf Neugebauer
78da52e8fd kernel: Add the kernel version to the hub image
A given image is pushed to hub twice, once as
kernel:<kernel version>.<major version>.x and once as
kernel:<kernel version>.<major version>.<minor version>-<n>.

The latter is used to decide if a new kernel image is pushed to hub.

Most users should use the former to pick up the latest kernel.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-03-14 10:54:01 +00:00
Rolf Neugebauer
c3fc6faa35 kernel: Remove AUFS kernel
We default to overlay, so no need to carry AUFS patches and kernel.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-03-14 10:51:52 +00:00
Rolf Neugebauer
f1f329db5b kernel: Pass kernel version as build-arg to docker
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-03-13 20:15:13 +00:00
Rolf Neugebauer
9d322e355f kernel: Add Makefile to kernel build dependencies
This will also include it in the sha1 calculation

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-03-13 20:15:13 +00:00
Justin Cormack
02316651c3 Merge pull request #1282 from rneugeba/ltp
Add initial support for a Linux Test Project container
2017-03-13 19:05:48 +00:00
Rolf Neugebauer
c50bcb6611 tools: Add YAML file for running LTP
LTP does need disk access, so this needs to be added once it
is supported again.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-03-13 17:43:10 +00:00
Rolf Neugebauer
c792c76bae tools: Add initial Linux Test Project container
LTP is compiled in on debian container and the binaries
then copied into another container, which is pushed to hub.

LTP does not compile on Alpine as it uses glibc specific
pthread extensions.

I tried to link LTP statically to not require a glibc based
base image but that failed too.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-03-13 17:43:10 +00:00
Riyaz Faizullabhoy
e9e2afe383 Merge pull request #1290 from riyazdf/ro-system-containers
Add read-only option to containers, apply to all except nginx
2017-03-13 16:23:44 +00:00
Justin Cormack
605b8a1e2b Merge pull request #1294 from justincormack/ssh
Add a WIP example to run sshd
2017-03-13 16:23:06 +00:00
Justin Cormack
e3aad24067 Merge pull request #1296 from ijc25/q35-and-kvm
qemu: Enable KVM support and switch to Q35
2017-03-13 15:55:16 +00:00
Riyaz Faizullabhoy
0a4347c906 Merge pull request #1293 from justincormack/ipc-typo
Fix typo/copy paste for IPC namespaces
2017-03-13 15:52:58 +00:00
Riyaz Faizullabhoy
a17def07b4 Add read-only option to containers, apply to all except nginx
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2017-03-13 15:51:03 +00:00
Ian Campbell
6788566a62 qemu: Enable KVM support and switch to Q35
Passing accel=kvm:tcg causes it to try KVM first if available with a fallback
to TCG (emulated/JIT mode) if it is not available. With this the boot logs gain:

+Hypervisor detected: KVM

and also

-Booting paravirtualized kernel on bare hardware
+Booting paravirtualized kernel on KVM

Among various other noise.

If I rename my host /dev/kvm then this is reversed, although with the following
message:

  Could not access KVM kernel module: No such file or directory
  failed to initialize KVM: No such file or directory
  Back to tcg accelerator.

Q35 is a more modern emulated platform based on the ICH9 host chipset rather
than the default "pc" I440FX (Pentium Pro / Pentium II era) emulation. See
http://wiki.qemu-project.org/Features/Q35 for more info. Switching to Q35 is
not a requirement for enabling KVM but seemed like a reasonable change.

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2017-03-13 15:39:08 +00:00
Justin Cormack
8811fd158e Add a WIP example to run sshd
- Currently only works if you add your ssh key in the example yaml, but will replace
with metadata support shortly.
- sshd logging not yet configured (needs to share syslog socket).

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-03-13 15:19:54 +00:00
Justin Cormack
daa63abd22 Fix typo/copy paste for IPC namespaces
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-03-13 15:00:22 +00:00