588 Commits
v0.5 ... v0.6

Author SHA1 Message Date
Rolf Neugebauer
10f07ca162 Merge pull request #3138 from rn/rel_v0.6
Release prep for v0.6
2018-07-27 00:03:32 +01:00
Rolf Neugebauer
483e7fd111 Update CHANGELOG
Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2018-07-26 21:10:37 +01:00
Rolf Neugebauer
9edd8b232b Bump version to v0.6
Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2018-07-26 21:02:29 +01:00
Rolf Neugebauer
8f841600a4 doc: Add updating AUTHORS to release steps
Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2018-07-26 21:01:59 +01:00
Rolf Neugebauer
bb7961344d Update my email in AUTHORS and MAINTAINERS
Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2018-07-26 21:00:24 +01:00
Rolf Neugebauer
d5d4d6fe0d Update package tags to v0.6
Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2018-07-26 20:57:30 +01:00
Rolf Neugebauer
3084225180 example: Update docker DIND to 18.06.0
Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2018-07-26 20:06:45 +01:00
Rolf Neugebauer
21ff90c4c7 pkgs: Update packages to the latest linuxkit/alpine
Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2018-07-26 20:03:09 +01:00
Rolf Neugebauer
6fcd0e8429 tests: Update tests cases to the latest linuxkit/alpine
Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2018-07-26 20:02:29 +01:00
Rolf Neugebauer
27bb10a14c Update use of test packages to latest
Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2018-07-26 20:02:12 +01:00
Rolf Neugebauer
2b1428b3d6 tests: Update packages to the latest linuxkit/alpine
Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2018-07-26 19:49:40 +01:00
Rolf Neugebauer
169e97fe52 Update use of tools to latest
Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2018-07-26 19:49:18 +01:00
Rolf Neugebauer
768593b951 tools: Update to the latest linuxkit/alpine
Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2018-07-26 19:22:42 +01:00
Rolf Neugebauer
ca53674154 tools/alpine: Update to latest
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@gmail.com>
2018-07-26 14:20:05 -04:00
Rolf Neugebauer
bfa8be505b Merge pull request #3136 from rn/sources
Allow external directories for 'linuxkit pkg build'
2018-07-26 18:06:15 +01:00
Rolf Neugebauer
29dd9f2004 doc: Add 'sources' documentation
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-07-26 16:23:35 +01:00
Rolf Neugebauer
bebde3a2ea cmd/pkg: Build a build context from 'sources'
This is the final piece. If 'sources' are defined, tar up
the sources and rewrite them accordingly. Pass it as build
build context to 'docker'.

This allows building from something like this:

  ├── etc
  │   ├── foo
  └── foo
      ├── Dockerfile
          ├── build.yml
          └── main.go

With 'build.yml':

  image: foo
  extra-sources:
    - ../etc:etc

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-07-26 16:23:35 +01:00
Rolf Neugebauer
b03288f5b4 cmd/pkg: Add the ability to pass a build context to docker
This commit adds the ability to add a build context to
docker for the package build. The build context is passed
on stdin to the docker process.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-07-26 16:23:34 +01:00
Rolf Neugebauer
ba4d1c79b0 cmd/pkg: Extract 'extra-sources' and adjust hash calculation
If the build.yml specifies 'extra-sources', ie sources
outside the package directory, calculate the hash based on
the tree hash of all source directories and the package
directory.

Note, this requires the source directories to be under
git revision control.

Also clean up the src and dst of the path and stash the
result in the Pkg structure.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-07-26 16:23:34 +01:00
Rolf Neugebauer
75149c56c2 cmd/pkg: Add 'extra-source' field to the pkg schema
And 'sources' to the Pkg structure

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-07-26 14:27:54 +01:00
Rolf Neugebauer
ce6b15c0b6 Merge pull request #3137 from rn/kup
Kernel update to 4.17.10/4.14.58/4.9.115/4.4.144
2018-07-26 07:51:36 +01:00
Rolf Neugebauer
0c631d104f Update YAMLs to latest kernels.
Looks like I missed a few 4.4.x updates to the YAMLs.

Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2018-07-25 23:02:39 +01:00
Rolf Neugebauer
21fb4db99b kernel: Update to 4.17.10/4.14.58/4.9.115/4.4.144
Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2018-07-25 21:09:25 +01:00
Rolf Neugebauer
d2b8f5291d Merge pull request #3135 from rn/kernel-iso
Add kernel+iso output
2018-07-25 13:14:19 +01:00
Rolf Neugebauer
cad4248024 tests: Fix summary for build format tests
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-07-25 11:41:36 +01:00
Rolf Neugebauer
b0212e7023 tests: Test kernel+iso format
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-07-25 11:41:32 +01:00
Rolf Neugebauer
69d913c5a7 cmd: Add 'kernel+iso' output format
This output format create a kernel + and straight data ISO.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-07-25 11:34:36 +01:00
Rolf Neugebauer
594ce1251d tools: Add a mkimage variant to build a non-bootable ISO.
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-07-25 11:25:59 +01:00
Rolf Neugebauer
1f9b598b1c Merge pull request #3134 from rn/tools-fix
Fix mkimage- builds
2018-07-24 23:57:17 +01:00
Rolf Neugebauer
66b7417819 cmd: Update mkimage-* hashes
Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2018-07-24 22:30:53 +01:00
Rolf Neugebauer
a9552aee2d tools: Fix mkimage-squashfs
Us a scratch image as the base instead of the alpine
base image.

Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2018-07-24 22:30:53 +01:00
Rolf Neugebauer
fe569b627a tools: Fix mkimage-raw-efi
Use a scratch image as the base instead of the full
alpine base.

Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2018-07-24 22:30:53 +01:00
Rolf Neugebauer
24d8ecc943 tools: Fix mkimage-raw-bios
Build the final image from scratch instead of the full
alpine base image.

Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2018-07-24 22:30:53 +01:00
Rolf Neugebauer
99e65ef998 tools: Fix mkimage-qcow2-efi
Build the final image from scratch instead of the full
alpine base.

Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2018-07-24 22:30:53 +01:00
Rolf Neugebauer
47bff24b94 tools: Fix mkimage-iso-efi
Build the final image from SCRATCH instead of the alpine base.
Should be a lot smaller now.

Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2018-07-24 22:30:53 +01:00
Rolf Neugebauer
4ca0458526 tools: Use a multi-stage build for mkimage-iso-bios
mkimage-iso-bios contained the full alpine base. Only
copy packages actually needed.

Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2018-07-24 22:30:53 +01:00
Rolf Neugebauer
d04a42868f Merge pull request #3132 from rn/kernel-up
Update kernels to 4.17.8/4.17.9/4.14.57/4.9.114/4.4.142/4.4.143
2018-07-24 19:15:23 +01:00
Rolf Neugebauer
c2a083118e Update YAMLs to latest kernels
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-07-24 16:25:52 +01:00
Rolf Neugebauer
6bfba4e85c kernel: Adjust arm64 kernel config to upstream changes
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-07-24 13:13:42 +01:00
Rolf Neugebauer
480a8bc860 kernel: Update to 4.17.9/4.14.57/4.9.114/4.4.143
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-07-24 11:56:25 +01:00
Rolf Neugebauer
5ab7eaac89 kernel: Update to 4.17.8/4.4.142
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-07-24 10:26:37 +01:00
Rolf Neugebauer
8dcddf6be4 Merge pull request #3126 from djs55/logwrite-extension
memlogd/logwrite: use the same naming convention as init
2018-07-20 20:08:44 +01:00
David Scott
d6e7fb9549 Update yaml to linuxkit/memlogd:ba4fcf55c35a3833546a1e39125bf0fa940327b0
Signed-off-by: David Scott <dave.scott@docker.com>
2018-07-20 17:06:15 +01:00
Rolf Neugebauer
eede8a5dc7 Merge pull request #3125 from rn/auth
Enable 'linuxkit build' with private repositories and registries
2018-07-20 16:47:26 +01:00
David Scott
ddee5f27f3 memlogd/logwrite: use the same naming convention as init
In e8786d73bb the logwrite package will
automatically append .log to every log.

In 5201049f2c the init package will send
stderr of a service `s` to a log named `s` and the stdout to `s.out`.
Therefore the files we create on disk are `s.log` and `s.out.log`.

This patch modifies the memlogd `logwrite` command-line wrapper to use
the same convention.

Note there is a confusing name clash between `pkg/logwrite` and `cmd/logwrite`
in `memlogd` modified here.

Signed-off-by: David Scott <dave.scott@docker.com>
2018-07-20 15:31:29 +01:00
Rolf Neugebauer
5dcb3d48cb docs: Update documentation regarding private repos
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-07-20 14:35:45 +01:00
Rolf Neugebauer
04c061fb8c docs: Remove note on private images
It no longer applies.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-07-20 13:48:27 +01:00
Rolf Neugebauer
615b122767 cmd: Add support for private repositories and registries
This commit adds support for authentication for image pulls for
'linuxkit build'. For each image reference we look up credentials
via the docker CLI configuration and use it if defined for
a given registry server. The code caches credentials to avoid
lookups for every image.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-07-20 13:48:26 +01:00
Rolf Neugebauer
1679668121 cmd: Vendor 'github.com/docker/cli' and its deps
This vendors the bits from 'github.com/docker/cli' needed
to pull private images.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-07-20 13:48:26 +01:00
Rolf Neugebauer
e410070401 cmd: Use "context" instead of "x/net/context"
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-07-20 13:11:20 +01:00
Rolf Neugebauer
c4f8af23ff cmd: Update vendoring to for docker/docker and dependencies
A subsequent commit will enable support for private repositories.
This requires some functions from 'github.com/docker/cli' which
in turn relies on some newer versions of some of the vendored
packages here.

In this commit, update all packages used here to the versions
used by 'github.com/docker/cli' release 18.06 (the latest stable).

This requires vendoring a bunch of additional packages, such
as prometheus

Also run 'sort' over 'vendor.conf' to keep things in order.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-07-20 13:11:20 +01:00
Rolf Neugebauer
5d7c1b215a Merge pull request #3124 from zx2c4-forks/wireguard-bump
wireguard: upgrade to 0.0.20180718
2018-07-19 08:13:41 +01:00
Jason A. Donenfeld
f8b14ba25a wireguard: upgrade to 0.0.20180718
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-07-19 00:00:08 +02:00
Rolf Neugebauer
3520778dcf Merge pull request #3122 from rn/kup
Kernel update to 4.17.7/4.14.56/4.9.113/4.4.141
2018-07-17 18:59:06 +01:00
Rolf Neugebauer
3a03177791 Update YAMLs to latest kernels
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-07-17 16:57:50 +01:00
Rolf Neugebauer
1896951b04 kernel: Tweak config for x86
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-07-17 15:00:23 +01:00
Rolf Neugebauer
f70fc83b1d kernel: Update to 4.17.7/4.14.56/4.9.113/4.4.141
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-07-17 13:48:18 +01:00
Rolf Neugebauer
aa37cf250f Merge pull request #3121 from rn/authors
Update AUTHORS
2018-07-17 13:20:15 +01:00
Rolf Neugebauer
9b0173a183 Update AUTHORS
We had a few contributors to `moby/tool`. Since this is merged here
update AUTHORS list.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-07-17 11:51:17 +01:00
Rolf Neugebauer
090f461e7f Merge pull request #3117 from steeve/patch-1
Change GCP metadata SSH keys URL
2018-07-16 20:40:59 +01:00
Rolf Neugebauer
358f1a812a Merge pull request #3115 from justincormack/merge-moby-tool
Merge moby tool back into LinuxKit
2018-07-16 17:52:37 +01:00
Steeve Morin
0748457296 examples: Update linux/metadata:721562e6f3ba9b6c003f9e746ff7ee94796f5251
Signed-off-by: Steeve Morin <steeve.morin@gmail.com>
2018-07-16 18:50:01 +02:00
Justin Cormack
cf5cec204d Update LinuxKit for merge of moby tool
- use the mkimage hashes that we had in LinuxKit as more up to date than tool.
- update docs
- move the code from moby under src/cmd/linuxkit

Signed-off-by: Justin Cormack <justin@specialbusservice.com>
2018-07-16 14:22:15 +01:00
Ian Campbell
5fd9470215 Merge pull request #3119 from ijc/containerd-v1.1.2
Containerd v1.1.2
2018-07-16 12:40:57 +01:00
Ian Campbell
1dfe16e570 Bump yml to pickup containerd v1.1.2
Signed-off-by: Ian Campbell <ijc@docker.com>
2018-07-16 10:57:37 +01:00
Ian Campbell
eb48b1284c Bump packages to new alpine w/ containerd v1.1.2
Signed-off-by: Ian Campbell <ijc@docker.com>
2018-07-16 10:29:41 +01:00
Ian Campbell
6b6596f881 alpine: Bump to containerd v1.1.2
Signed-off-by: Ian Campbell <ijc@docker.com>
2018-07-16 05:29:27 -04:00
Steeve Morin
33b6fc77ea Change GCP metadata SSH keys URL
According to [1] the URL is not sshKeys but ssh-keys now.

[1] https://cloud.google.com/compute/docs/storing-retrieving-metadata

Signed-off-by: Steeve Morin <steeve.morin@gmail.com>
2018-07-15 01:29:31 +02:00
Rolf Neugebauer
d05c9c0af6 Merge pull request #3116 from rn/kernel-up
Update kernels to 4.17.6/4.14.55/4.9.112/4.4.140 + test fixes
2018-07-14 21:42:31 +01:00
Rolf Neugebauer
68cacfe871 tests: Fix the kernel in some tests
These must have fallen through the crack during various
kernel updates. Move everything to the latest 4.14.x kernel.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@gmail.com>
2018-07-14 14:47:52 +01:00
Rolf Neugebauer
e3369b11a6 Update YAMLs to latest kernels
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@gmail.com>
2018-07-14 14:45:55 +01:00
Rolf Neugebauer
c9dc3b97de kernel: Update to 4.17.6/4.14.55/4.9.112/4.4.140
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@gmail.com>
2018-07-14 13:10:03 +01:00
Justin Cormack
021b5718f8 Merge moby/tool into LinuxKit
Note these ended up with unrelated histories in the export process.

Signed-off-by: Justin Cormack <justin@specialbusservice.com>
2018-07-14 11:26:02 +01:00
Justin Cormack
b807994372 Remove all the parts we do not need when merged back into LinuxKit
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2018-07-14 10:44:21 +01:00
Rolf Neugebauer
3e4a5342b2 Merge pull request #3113 from rn/test-fix
Update linuxkit/alpine for test cases
2018-07-13 21:35:46 +01:00
Rolf Neugebauer
6b6c93d9d8 Merge pull request #3114 from djs55/kmsg.stderr
Write stderr to /var/log/<name>.log
2018-07-13 13:45:54 +01:00
David Scott
887810a773 Update yml to linuxkit/kmsg:cf3dc833591838596427aac032c829ea592599d0
Signed-off-by: David Scott <dave.scott@docker.com>
2018-07-13 11:48:16 +01:00
David Scott
637b1bdb3f pkg/kmsg: write to stderr (instead of stdout)
Part of #3111

Signed-off-by: David Scott <dave.scott@docker.com>
2018-07-13 11:48:16 +01:00
David Scott
70385eb86e Update yml to linuxkit/init:3f1e5c32d6ca9e83a7ea7ad9854da2032971a83f
Signed-off-by: David Scott <dave@recoil.org>
2018-07-13 11:48:16 +01:00
David Scott
7c243a8e8b pkg/init: only create /var/log/onboot symlink if not using memlogd
When logging directly to files (the not-using-memlogd case) the onboot
services must log to /run/log because /var/log might be overmounted
by a persistent disk. Therefore we create a symlink at the end of
the onboot section.

When logging via memlogd, all logs are buffered until a logwrite service
starts, so no symlink is needed.

Signed-off-by: David Scott <dave.scott@docker.com>
2018-07-13 11:47:43 +01:00
David Scott
5201049f2c pkg/init: write stderr to <name> rather than <name>.err
This will then be written to disk as <name>.log by logwrite.

Part of #3111

Signed-off-by: David Scott <dave.scott@docker.com>
2018-07-13 10:48:31 +01:00
Justin Cormack
72e919f4b3 Merge pull request #3112 from rn/bcc-pkg
Add packages needed for iovisor/bcc
2018-07-12 11:06:35 +01:00
Rolf Neugebauer
59e04612b4 docs: Add update of test cases to release doc
While at it also improve the commit messages.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-07-12 10:38:32 +01:00
Rolf Neugebauer
1ebc8c0099 tests: Update linuxkit/alpine for tests as well.
I missed this during the recent updates.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-07-12 10:34:12 +01:00
Rolf Neugebauer
3beb03c684 tools/alpine: Update linuxkit/alpine
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@gmail.com>
2018-07-11 23:59:20 +00:00
Rolf Neugebauer
7d9457382c tools/alpine: Add packages needed for the iovisor/bcc tools
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@gmail.com>
2018-07-12 00:25:30 +01:00
Rolf Neugebauer
ecd412d087 Merge pull request #3109 from rn/log
Add '.log' as file extension to 'pkg/logwrite' files
2018-07-11 22:03:35 +01:00
Rolf Neugebauer
71b5dc8010 Update YAMLs to new logwrite package
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-07-11 19:17:01 +01:00
Rolf Neugebauer
83f3c58c50 examples: Use alpine:3.8 in logging example
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-07-11 15:55:28 +01:00
Rolf Neugebauer
d92ca6d6e4 tests: Adjust logging test to new .log extension
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-07-11 15:55:28 +01:00
Rolf Neugebauer
e8786d73bb pkg/logwrite: Append .log to the log files
Also simplify the code by directly storing the path to
the log file in the LogFile structure.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-07-11 15:55:27 +01:00
Rolf Neugebauer
90765efac5 Merge pull request #3107 from rn/typo
Fix typo in CHANGELOG
2018-07-11 13:27:23 +01:00
Rolf Neugebauer
77eafc5d6d Fix typo in CHANGELOG
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-07-11 10:26:02 +01:00
Rolf Neugebauer
fa3bbe3867 Merge pull request #3105 from rn/post_rev0.5
Bump version to v0.5+
2018-07-11 10:21:21 +01:00
Rolf Neugebauer
095bacc396 Bump version to v0.5+
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@gmail.com>
2018-07-11 00:00:10 +01:00
Rolf Neugebauer
977dec7ae2 Merge pull request #216 from justincormack/gnutar2
Use PAX tar format
2018-07-04 16:08:57 +01:00
Justin Cormack
d3a1de393f Use PAX tar format
The default Go tar has restrictions on filename length for example.

PAX is recommended over GNU.

Requires Go 1.10

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2018-04-24 16:46:26 +01:00
Justin Cormack
3a3a4560a3 Merge pull request #217 from justincormack/go1.10
Move to Go 1.10
2018-04-24 16:42:37 +01:00
Justin Cormack
0eb9076675 Move to Go 1.10
We need the Format exptension in the tar package.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2018-04-24 16:20:15 +01:00
Justin Cormack
3dbad3b7da Merge pull request #214 from rn/squash
Add  'kernel+squashfs' output format
2018-04-16 14:46:47 +01:00
Rolf Neugebauer
a39cee3f18 initrd: Skip rest of ./boot
For the initrd we only want to extract kernel, cmdline, and
the ucode CPIO archive. Skip whatever is left in ./boot

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-04-16 14:42:14 +01:00
Rolf Neugebauer
ad11be6b83 moby: Add 'kernel+squashfs' output
This output produces a kernel and a root filesystem
in squashfs format. squashfs is a read-only, compressed
filesystem.

The 'kernel+squashfs' output can be used in a similar way as
the default 'kernel+initrd' output format with the benefit
that the rootfs does not consume any memory.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-04-16 14:35:38 +01:00
Rolf Neugebauer
52cb0e1cfe moby: Improve debug output for 'docker run'
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-04-16 14:12:19 +01:00
Rolf Neugebauer
4a569d2815 Merge pull request #213 from rn/mkimage
Add ability to overwrite images used for outputs
2018-04-13 13:56:16 +01:00
Rolf Neugebauer
4cae8c95e3 Add ability to overwrite images used for outputs
We currently hardcode the Linuxkit/mkimage- images. This has the
unfortunate consequence that, if we update the LinuxKit image used
to generate the output, we have to update the Moby tool and then
vendor it back into the LinuxKit repository.

This commit introduces UpdateOutputImages() which allows a client
of the Moby tools package to selectively overwrite the packages
used to generate the outputs.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@gmail.com>
2018-04-13 13:50:33 +01:00
Justin Cormack
9534e84ffe Merge pull request #212 from justincormack/notaryup
Update Notary vendor
2018-04-12 11:37:44 +01:00
Justin Cormack
ede65b6445 Update Notary vendor
Bring some other vendoring in line with Notary

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2018-04-11 11:13:10 +01:00
Rolf Neugebauer
486e313fe3 Merge pull request #211 from rn/update
Update mkimage images based on linuxkit/alpine to latest.
2018-04-05 11:37:59 +01:00
Rolf Neugebauer
f848bc9a3c Update mkimage images based on linuxkit/alpine to latest.
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-04-05 11:07:53 +01:00
Justin Cormack
f1ae82c9eb Merge pull request #210 from justincormack/bind-shared
Default bind mounts to rshared not rprivate if not specified
2018-04-04 18:54:44 +01:00
Justin Cormack
25cfac5463 Default bind mounts to rshared not rprivate if not specified
It is quite confusing that from the host or another container that
binds `/containers` you cannot see the bind mounts, you have to enter
the container namespace. I think `rshared` is a better default. You
can always be explicit and add `private` if you want a private bind mount.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2018-03-26 13:54:49 -07:00
Justin Cormack
749585dd13 Merge pull request #208 from rn/up
Update mkimage packages
2018-03-19 21:23:35 -07:00
Rolf Neugebauer
efeb0ac185 Update mkimage packages
They have been update in linuxkit/linuxkit in prep for
s390x support.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-03-16 09:53:35 +00:00
Justin Cormack
ed49ca3aa0 Merge pull request #207 from nogoegst/fix-dup-string-readme
Reword the README to remove repeating statements
2018-03-12 14:17:34 +00:00
Ivan Markin
47986c53e9 Reword the README to remove repeating statements
Signed-off-by: Ivan Markin <sw@nogoegst.net>
2018-03-11 20:28:52 +00:00
Justin Cormack
c9d52b5787 Merge pull request #206 from justincormack/notaryup
Update notary vendor to 0.6.0
2018-03-01 11:23:24 +00:00
Justin Cormack
8682dd213f Merge pull request #205 from garthy/qcow2-efi-support
Add qcow2 EFI image building support
2018-03-01 11:23:18 +00:00
Justin Cormack
d3919d0a79 Update notary vendor to 0.6.0
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2018-03-01 11:15:50 +00:00
Garth Bushell
e1b4f769cb Add qcow2 EFI image building support
Signed-off-by: Garth Bushell <garth.bushell@oracle.com>
2018-03-01 11:11:23 +00:00
Justin Cormack
830794f3c0 Merge pull request #204 from deitch/fix-doc-typos
Fix typos
2018-02-16 11:48:36 +00:00
Avi Deitcher
07878aa631 Fix typos
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2018-02-15 21:37:38 +02:00
Justin Cormack
4a0d9e1247 Merge pull request #203 from deitch/docs-for-private-repos
Add documentation about using images from private registries
2018-02-15 13:24:21 +00:00
Avi Deitcher
01ea437bd1 Add documentation about using images from private registries
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2018-02-15 14:43:17 +02:00
Justin Cormack
bd556c86f7 Merge pull request #201 from rn/fix
The vmdk and dynamic-vhd packages had a bug in them
2018-01-25 19:35:07 +00:00
Rolf Neugebauer
8fb1a88757 The vmdk and dynamic-vhd packages had a bug in them
This picks up a newer version

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-01-25 18:04:07 +00:00
Rolf Neugebauer
7fb28974b6 Merge pull request #200 from rn/up
Update LinuxKit images to the latest
2018-01-25 14:48:36 +00:00
Rolf Neugebauer
5c1ebdbaa2 Update LinuxKit images to the latest
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-01-25 14:15:52 +00:00
Justin Cormack
caca03c097 Merge pull request #199 from justincormack/namespace
Add support for setting containerd namespace in runtime config
2018-01-17 14:19:45 +00:00
Justin Cormack
2dd65d27b6 Add support for setting containerd namespace in runtime config
This adds a namespace field to override the LinuxKit containerd
default namespace, in case you want to run a container in another
namespace.

Needs a patch in LinuxKit to implement this that I will open soon.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2018-01-17 14:12:15 +00:00
Justin Cormack
978deceed0 Merge pull request #198 from justincormack/annotations
Add support for OCI annotations in config
2018-01-17 12:40:31 +00:00
Justin Cormack
929a837d65 Add support for OCI annotations
Annotations do not do anything by default but get passed through to the runtime,
which can be useful. I never metadata I didn't like...

Also fix sysctl to be a map in the validation, not an array. I can't see any
examples using this in LinuxKit, but this matches OCI so is correct.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2018-01-17 12:26:08 +00:00
Justin Cormack
7918437b72 Make test should be phony
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2018-01-17 12:02:32 +00:00
Rolf Neugebauer
57b6e2ab94 Merge pull request #197 from rn/ucode
Add support for Intel ucode
2018-01-15 17:00:03 +00:00
Rolf Neugebauer
1d995e198a docs: Document the 'ucode' kernel option.
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-01-15 16:49:43 +00:00
Rolf Neugebauer
5d5a13526b output: Add support for CPU ucode to the kernel+initrd format
This prepends 'ucode.cpio' to the initrd if present. Padding
should not be necessary as the ucode.cpio should be padded
to the right size.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-01-15 16:49:43 +00:00
Rolf Neugebauer
1d24454438 output: Add ucode.cpio to the tar-kernel-initrd format
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-01-15 16:49:42 +00:00
Rolf Neugebauer
2b1a611bab output: Extract ucode if present
For now the backends for the different formats do not yet
use the extracted ucode cpio archive, but '// TODO' are
placed for the backends which should eventually handle it.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-01-15 16:49:42 +00:00
Rolf Neugebauer
0c1b1def13 build: Add ucode to the intermediate tar ball if specified
This extends the kernel filter to also look for the CPU microcode
file if specified in the YAML. If found, the ucode cpio archive
is placed into the intermediate tar file as '/boot/ucode.cpio'.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-01-15 16:49:42 +00:00
Rolf Neugebauer
b4704b8ba1 config: Add 'ucode' to the kernel schema
This optional option will allow users to specify a CPU
microcode cpio archive to be prepended to the initrd file.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-01-15 16:49:42 +00:00
Justin Cormack
f816553d2f Merge pull request #195 from ijc/prepend-rootfs-mounts
Prepend the rootfs mounts to the user specified runtime.mounts.
2018-01-11 12:15:18 +00:00
Ian Campbell
0a6d69d2d3 Prepend the rootfs mounts to the user specified runtime.mounts.
User specified mounts should be able to rely on the rootfs being mounted, in
particular for a writeable container they should expect the writeable overlay
to already be in place.

Signed-off-by: Ian Campbell <ijc@docker.com>
2018-01-11 11:42:25 +00:00
Justin Cormack
1aca4eefa5 Merge pull request #190 from ijc/containerd-v1.0.0-rc.0
Bump to containerd v1.0.0
2018-01-04 11:28:10 +00:00
Justin Cormack
b5615a3714 Merge pull request #192 from w9n/fix_empty_container_config
allow ImageInspect.Config to be nil when parsing
2018-01-04 11:27:42 +00:00
Justin Cormack
41d67e3bf3 Merge pull request #194 from w9n/yml_omitempty
add omitempty for yml config
2018-01-04 11:26:54 +00:00
Robin Winkelewski
175fadb3d4 add omitempty for yml config
Signed-off-by: Robin Winkelewski <w9ncontact@gmail.com>
2017-12-27 03:08:44 +01:00
Robin Winkelewski
1b06de3136 fix inspect.Config usage
Signed-off-by: Robin Winkelewski <w9ncontact@gmail.com>
2017-12-14 07:11:17 +01:00
Justin Cormack
d9d2a91780 Merge pull request #193 from ijc/bugfix-191
Defer dockerRm until we are finished with the contents
2017-12-13 09:35:13 -08:00
Ian Campbell
307f13b129 Defer dockerRm until we are finished with the contents
This was introduced by #191 but somehow did not trigger either for me in local
testing or in CI.

It did trigger in initial CI of https://github.com/linuxkit/linuxkit/pull/2811
which can be seen at https://linuxkit.datakit.ci/linuxkit/linuxkit/pr/2811?history=1637690296123e9a15307b3a41b290da6e27e7cc
The error is:

    Failed to docker rm container «...»: «...»: aufs: unmount error after retries: «...»: device or resource busy

No doubt because we were still holding an open fd while trying to remove the
container.

Unclear why this didn't repro for me (docker 17.11.0-ce with overlay2) or
whatever CI uses.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-12-13 11:44:32 +00:00
Ian Campbell
12629fcb96 Bump to containerd v1.0.0
Since that bumps to gogo protobuf v0.5 too do the same.

Note that there are no actual containerd changes here, although there are some
gogo proto ones.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-12-13 10:12:42 +00:00
Justin Cormack
ebd7228a44 Merge pull request #191 from ijc/reduce-memory-via-tempfiles
Reduce maximum memory usage via tempfiles
2017-12-12 13:27:32 -08:00
Ian Campbell
3045a80c85 Stream docker export directly to consumer
Rather than queueing up into a `bytes.Buffer`.

In my test case (building kube master image) this reduces Maximum RSS (as
measured by time(1)) compared with the previous patch from 2.8G to 110M. The
tar output case goes from 2.1G to 110M also. Overall allocations are ~715M in
both cases.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-12-06 16:41:42 +00:00
Ian Campbell
9f44acf8e3 Generate intermediate image into a temp file
All of the `output*` functions took a `[]byte` and immediately wrapped it in a
`bytes.Buffer` to produce an `io.Reader`. Make them take an `io.Reader` instead
and satisfy this further up the call chain by directing `moby.Build` to output
to a temp file instead of another `bytes.Buffer`.

In my test case (building kube master image) this reduces Maximum RSS (as
measured by time(1)) from 6.7G to 2.8G and overall allocations from 9.7G to
5.3G. When building a tar (output to /dev/null) the Maximum RSS fell slightly
from 2.2G to 2.1G. Overall allocations remained stable at around 5.3G.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-12-06 16:07:46 +00:00
Ian Campbell
9558740c11 Add cpu and mem profiling options
Following https://golang.org/pkg/runtime/pprof/. When attempting to build
images in https://github.com/linuxkit/kubernetes CI the process is mysteriously
being SIGKILL'd, which I think might be down to OOMing due to the resource
limits placed on the build container.

I haven't done so yet but I'm intending to use these options to investigate and
they seem potentially useful in any case, even if this turns out to be a
red-herring.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-12-06 15:54:48 +00:00
Justin Cormack
656bd87fd2 Merge pull request #189 from ijc/image-config-substruct
Split config-related fields of Image into a substruct.
2017-11-28 11:59:25 +00:00
Ian Campbell
f9893d9a9b Fixup test after Image → ImageConfig split.
The syntax used for the yaml definitions is changed by the need to include the
substruct in the struct literal.

For the label switch to `ImageConfig` directly, which is actually more correct
in that it avoids spurious `name` and `image` fields in the label.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-11-27 14:47:21 +00:00
Ian Campbell
aec82c4cdf Split config-related fields of Image into a substruct.
Where "config-related" here means "ones you might find in the
"org.mobyproject.config" label on an image.

By making this new struct an anonymous member of the existing Image struct the
Go json parser does the right thing (i.e. inlines into the parent) when parsing
a complete image (from a yml assembly) by default. The Go yaml library which we
use requires a tag on the anonymous field to achieve the same.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-11-27 14:16:59 +00:00
Justin Cormack
63a5dedd28 Merge pull request #188 from justincormack/make-tmp-dir
Create tmp dir in case required
2017-11-20 16:59:27 +00:00
Justin Cormack
3389f89c44 Create tmp dir in case required
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-11-20 16:50:58 +00:00
Justin Cormack
ad2fda5769 Merge pull request #187 from justincormack/build-improvements
Make easier to use as a library
2017-11-20 14:05:25 +00:00
Justin Cormack
6395e339b9 Do not error if cache/config directory not specified
Just use the default. Easier to use as an external library.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-11-20 13:52:53 +00:00
Justin Cormack
e3a7739f42 Make easier to embed in LinuxKit
Split out util file in same way.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-11-20 12:04:08 +00:00
Justin Cormack
6ba3288963 Merge pull request #186 from gesellix/fix-docker-build-cmd
Fix docker format build example
2017-11-19 10:11:16 +00:00
Tobias Gesellchen
5aebd207d0 Fix docker format build example
Signed-off-by: Tobias Gesellchen <tobias@gesellix.de>
2017-11-18 22:22:33 +01:00
Justin Cormack
315e5f80e8 Merge pull request #185 from justincormack/fix-make
Stop make test from removing binary
2017-11-17 15:21:08 +00:00
Justin Cormack
f85e019d2e Merge pull request #183 from ijc/static-builds
Build a static binary
2017-11-17 14:43:08 +00:00
Justin Cormack
8f75b635ec Stop make test from removing binary
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-11-17 14:40:49 +00:00
Ian Campbell
532b41ff8b Disable CGO so as to build a static binary
https://github.com/linuxkit/kubernetes/pull/1#issuecomment-345253075 lead to
https://circleci.com/gh/linuxkit/kubernetes/15

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-11-17 14:39:19 +00:00
Justin Cormack
eceb6d11f8 Merge pull request #181 from justincormack/runtime-cgroups
Add Cgroups to runtime config
2017-11-17 14:12:08 +00:00
Justin Cormack
c9bb1ecdf1 Add Cgroups to runtime config
This will create the list of cgroups specified

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-11-17 13:22:38 +00:00
Justin Cormack
91311b9de8 Merge pull request #178 from tristanls/master
Prob: Files section does not work for /var dir
2017-11-16 17:20:33 +00:00
Justin Cormack
7c3e0e87b2 Merge pull request #182 from ijc/circleci-artefacts
Tweak circleci config to try and fix artifact upload
2017-11-16 17:19:58 +00:00
Ian Campbell
c180946fb4 Publish a checksum of the binaries.
Signed-off-by: Ian Campbell <ijc@docker.com>
2017-11-16 17:15:06 +00:00
Ian Campbell
fff4f0ce79 Try and put dist artifacts at the top level.
Signed-off-by: Ian Campbell <ijc@docker.com>
2017-11-16 17:13:41 +00:00
Ian Campbell
e6bdd72158 Tweak circleci config to try and fix artifact upload
It appears that the `$GOPATH` in `working_directory` is being treated as a literal
`GOPATH` at least when processing the `state_artifacts.path`. Inlining it seems
to have worked, at the cost of some duplication.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-11-16 17:13:11 +00:00
Tristan Slominski
11c90c4cdb Prob: Files section does not work for /var dir
Solv: Updated documentation to point out limits of
files section regarding /var, /run, and /tmp dirs.

Signed-off-by: Tristan Slominski <tristan.slominski@gmail.com>
2017-11-14 15:08:07 -06:00
Justin Cormack
a14db39956 Merge pull request #180 from ehazlett/poule-config
Initial poule config
2017-11-14 17:20:38 +00:00
Evan Hazlett
36c5bf55ed add initial poule config
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2017-11-14 12:16:54 -05:00
Justin Cormack
b262aaa058 Merge pull request #177 from arm64b/docker-efi-images
EFI image hash value update
2017-11-14 16:04:34 +00:00
Dennis Chen
90f1582988 EFI image hash value update
Update the hash value of EFI-* docker image

Signed-off-by: Dennis Chen <dennis.chen@arm.com>
2017-11-10 08:10:22 +00:00
Justin Cormack
76035cec2f Merge pull request #176 from justincormack/sirupsen
Update dependencies to use sirupsen not Sirupsen
2017-11-01 15:23:10 +00:00
Justin Cormack
45333d2480 Update dependencies to use sirupsen not Sirupsen
That entailed a few other fixes, eg small Notary API changes.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-11-01 15:14:58 +00:00
Justin Cormack
99480b5dd0 Merge pull request #175 from deitch/fix-prereqs
Fix prereqs in output.go
2017-10-31 10:37:55 +00:00
Avi Deitcher
31187652ce Fix prereqs, raw images with correct calcs
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2017-10-31 10:51:55 +02:00
Justin Cormack
3b03f76cd4 Merge pull request #174 from justincormack/no-gopath
Add a build target which works when GOPATH is not set or correct
2017-10-30 14:44:08 +00:00
Justin Cormack
a7158e1cb2 Add a build target which works when GOPATH is not set or correct
Getting Homebrew to work with a GOPATH is horrible...

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-10-30 14:39:59 +00:00
Justin Cormack
df201350c0 Merge pull request #172 from justincormack/fix-clean
rm -rf for clean
2017-10-30 13:36:25 +00:00
Justin Cormack
71dfe66ee1 rm -rf for clean
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-10-30 13:31:33 +00:00
Justin Cormack
a12e954d92 Merge pull request #173 from justincormack/lint-fix
Fix some lint errors with error checking
2017-10-30 13:31:11 +00:00
Justin Cormack
14ed0953cd Fix some lint errors with error checking
This is due to lack of rebase after linter changes.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-10-30 13:25:22 +00:00
Justin Cormack
4a95c04300 Merge pull request #169 from deitch/add-raw-efi-bios-rename-aws
Add raw file formats, rename raw to aws and qcow2 to qcow2-bios
2017-10-30 11:28:53 +00:00
Justin Cormack
626b41fd30 Merge pull request #162 from ebriand/init-processing-logging
Add back init image processing logging
2017-10-30 11:24:53 +00:00
Justin Cormack
4ed9d49d3a Merge pull request #168 from dnephin/improve-the-build
Improvements to Makefile, linting, and circleci.yml
2017-10-30 11:24:24 +00:00
Avi Deitcher
60c1ce5156 Add raw file formats, rename raw to aws and qcow2 to qcow2-bios
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2017-10-23 20:27:47 -04:00
Justin Cormack
57c6720356 Merge pull request #171 from ijc/pull-before-run
Do an explicit docker pull before docker run.
2017-10-20 17:26:16 +02:00
Ian Campbell
d9d6b56153 Do an explicit docker pull before docker run.
This avoids https://github.com/docker/cli/issues/631

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-10-20 15:51:47 +01:00
Daniel Nephin
ec741857ef Remove unnecessary vendor.
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2017-10-17 17:32:05 -04:00
Daniel Nephin
a224547540 Fix lint errors
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2017-10-17 17:30:47 -04:00
Daniel Nephin
e009b670f3 Improve makefile and circleci config
Use gometalinter for linting
put build artifact in dist/
store artifacts in circleci

Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2017-10-17 17:30:44 -04:00
Justin Cormack
b23d883ca5 Merge pull request #167 from rn/fix
Fix mkimage-iso-bios hash
2017-10-16 13:59:10 +02:00
Rolf Neugebauer
67ce80d213 Fix mkimage-iso-bios hash
Looks like a6b89f1137 ("Update linuxkit/mkimage-*") updated to a
non-existing tag.

linuxkit pkg show-tag tools/mkimage-iso-bios
linuxkit/mkimage-iso-bios:165b051322578cb0c2a4f16253b20f7d2797a502

and docker pull of that image works.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-10-16 12:52:02 +02:00
ebriand
0754e4d662 Add back init image processing logging
Signed-off-by: ebriand <eric.briand@gmail.com>
2017-10-16 11:00:19 +02:00
Justin Cormack
2fea21c0d7 Merge pull request #166 from rn/rpi3
output: Add support for creating Raspberry Pi images
2017-10-14 08:33:13 +01:00
Rolf Neugebauer
c1da07b3a8 output: Add support for creating Raspberry Pi images
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-10-13 18:02:17 +01:00
Justin Cormack
17865a1c3e Merge pull request #160 from nuald/docs
Updated the documentation regarding binds options.
2017-10-13 16:31:39 +01:00
Justin Cormack
f75e4f8291 Merge pull request #164 from ijc/update-mkimage-plus-no-docker-network
Update mkimage plus no docker network
2017-10-13 16:28:22 +01:00
Ian Campbell
52de62206d Ensure moby is rebuilt if deps change.
Signed-off-by: Ian Campbell <ijc@docker.com>
2017-10-13 10:59:55 +01:00
Ian Campbell
a6b89f1137 Update linuxkit/mkimage-*
These versions were created by https://github.com/linuxkit/linuxkit/pull/2607
which enables content trust, so drop the sha256 from all of them and ensure
DOCKER_CONTENT_TRUST is unconditionally set when running, since these
references are hardcoded we know they must be signed.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-10-13 10:56:21 +01:00
Ian Campbell
8825ca2e66 Disable network in dockerRun
AFAICT none of the callers (which all involve one of `linuxkit/mkimage-*`) have
any reason to hit the network.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-10-13 10:42:40 +01:00
Alexander Slesarev
76c36afc60 Updated the documentation regarding binds options.
Signed-off-by: Alexander Slesarev <alex.slesarev@gmail.com>
2017-10-10 08:51:08 +10:00
Justin Cormack
70c6aebd26 Merge pull request #159 from rn/img-ref
Restructure Image and image reference code
2017-10-09 12:29:13 +01:00
Justin Cormack
9abca80507 Merge pull request #158 from justincormack/tar-kernel-initrd
Add a "tar-kernel-initrd" output format
2017-10-09 12:27:11 +01:00
Rolf Neugebauer
1aee0c3d30 Update Image strings before writing them out
If the YAML file contains:
  - path: etc/linuxkit.yml
    metadata: yaml
in the fil section, the image was build with content trust,
then the linuxkit.yml file image contains fully qualified
image references (including the sha256).

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-10-04 17:59:02 +01:00
Rolf Neugebauer
ad83cb8928 Use containerd reference.Spec in place of the Image string
Instead of passing the image name as string use the a reference
to a containerd reference.Spec. This allows us, for example,
to update the reference in place when verifying content trust
with more specific information, such as the sha256

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-10-04 17:37:22 +01:00
Rolf Neugebauer
d9b79548a5 Add a containerd reference.Spec for the Image name
When constructing a Moby structure from a YAML also
extract a containerd reference.Spec for each image
and the kernel.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-10-04 17:26:42 +01:00
Rolf Neugebauer
1713f59e4f Turn Images into references
We want to modify some of the content of the Image structure
and thus have to pass them by reference.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-10-04 17:26:42 +01:00
Justin Cormack
e73a7b0315 Add a "tar-kernel-initrd" output format
This is a tarball of the kernel, initrd and cmdline files, suitable for
sending to the mkimage images that expect this format.

Note you can't currently stream this output format using `-o` will clean this
up in future commits.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-10-04 17:01:13 +01:00
Rolf Neugebauer
e8a5728ca3 Vendor containerd
The next commit will start using some components of containerd
so vendor the latest version.

The latest vndr also removed some un-needed files previously vendored.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-10-04 14:17:02 +01:00
Justin Cormack
61ff1e5bba Merge pull request #157 from justincormack/no-hyperkit
Remove the hyperkit option
2017-10-03 15:58:59 +01:00
Justin Cormack
aca26f00c2 Remove the hyperkit option
We are going to phase out the LinuxKit build option, in favour of keeping Docker
or a native Linux build option for CI use cases, as it is faster. So the
hyperkit option that only worked in one very limited use case is not needed.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-10-03 15:55:02 +01:00
Justin Cormack
ccaba8acc1 Merge pull request #156 from justincormack/no-init
Remove unused init package
2017-10-03 14:10:16 +01:00
Justin Cormack
fdee7f3792 Remove unused init package
We now use the same on as linuxkit.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-10-03 13:42:48 +01:00
Justin Cormack
cc823286f4 Merge pull request #153 from ijc/subassign-runtime
More granular merge of Runtime from labels & yaml
2017-10-02 11:40:14 +01:00
Justin Cormack
177969dc4a Merge pull request #154 from justincormack/iso-efi-update
Update to use new common iso EFI for amd64 and arm64
2017-09-25 11:11:24 -07:00
Justin Cormack
1fc16c4580 Update to use new common iso EFI for amd64 and arm64
See https://github.com/linuxkit/linuxkit/pull/2524

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-09-25 11:02:37 -07:00
Ian Campbell
a5a3b778c0 More granular merge of Runtime from labels & yaml
Previously any Runtime specified in yml would completely override anything from
the image label, even if they set distinct fields. This pushes the merging down
to the next layer, and in the case of BindNS down two layers.

Most of the fields involved needed to become pointers to support this, which
required a smattering of other changes to cope. As well as the local test suite
this has been put through the linuxkit test suite (as of cc200d296a).

I also tested in the scenario which caused me to file #152.

Fixes #152.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-09-22 13:18:36 +01:00
Justin Cormack
63eae8abee Merge pull request #149 from justincormack/shared-init
Used shared init with LinuxKit
2017-09-18 18:10:08 -07:00
Justin Cormack
dff6dc2876 Used shared init with LinuxKit
With https://github.com/linuxkit/linuxkit/pull/2500 the init script
can be used for both bare metal and in Docker.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-09-18 13:11:37 -07:00
Justin Cormack
7ee5ff77d1 Merge pull request #150 from ijc/updates
Couple of minor updates to metadata file output
2017-09-18 13:10:24 -07:00
Ian Campbell
411a21ae07 Make "metadata: yaml" actually output yaml
The existing code made json...

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-09-18 15:13:32 +01:00
Ian Campbell
2f01ab25ed Correct example yaml
Without the space I get:

    FATA[0000] Invalid config: yaml: line 66: could not find expected ':'

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-09-18 15:13:32 +01:00
Justin Cormack
1ff0e3beee Merge pull request #146 from justincormack/formats
Rename "output" to "format"
2017-09-01 23:51:27 +01:00
Justin Cormack
11b573c6fb Rename "output" to "format"
This was confusing as there is an option to output to a file as well.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-09-01 23:45:25 +01:00
Justin Cormack
69596e17dd Merge pull request #145 from justincormack/runtime-mount
Add support for mount in runtime config
2017-08-23 16:44:13 +01:00
Justin Cormack
cfa5d273b7 De-dup container root filesystems
With the mount framework we can de-dup containers that share the same image.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-08-22 17:27:08 +01:00
Justin Cormack
6b98aff58b Use the runtime config to specify how overlay should be created
This puts the build side in charge of the runtime layout, which enables
additional optimisations later, like sharing the rootfs if it is
used multiple times.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-08-22 16:21:56 +01:00
Justin Cormack
ee0901762f Add support for mount in runtime config
This could be used in LinuxKit now, as there are some examples, eg
https://github.com/linuxkit/linuxkit/blob/master/blueprints/docker-for-mac/base.yml#L33
which are creating containers to do a mount.

The main reason though is to in future change the ad hoc code that generates
overlay mounts for writeable containers with a runtime config which does
the same thing; this code needs to create both tmpfs and overlay mounts.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-08-22 15:17:54 +01:00
Justin Cormack
0d58d332be Merge pull request #144 from justincormack/runtime-config
Add support for runtime configuration
2017-08-18 15:50:39 +01:00
Justin Cormack
ea60eff557 Add support for runtime configuration
This adds a `runtime` section in the config that can be used
to move network interfaces into a container, create directories,
and bind mount container namespaces into the filesystem.

See also https://github.com/linuxkit/linuxkit/pull/2413

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-08-17 17:36:49 +01:00
Justin Cormack
d9546ee1ce Merge pull request #143 from justincormack/filepathjoin
Do not use filepath.Join if constructing LinuxKit paths
2017-08-14 17:36:59 +01:00
Justin Cormack
4da3c09e19 Do not use filepath.Join if constructing LinuxKit paths
This will do the wrong thing on Windows, and construct paths with \.

fix #142

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-08-14 15:38:58 +01:00
Justin Cormack
7a549fda07 Merge pull request #141 from justincormack/update-docker
Update docker examples
2017-08-10 15:05:22 +01:00
Justin Cormack
13b1eb7d0c Do not use rm as may not be in root filesystem
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-08-10 14:59:32 +01:00
Justin Cormack
2a097f543d update xeamples to new hashes
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-08-10 14:58:50 +01:00
Justin Cormack
0e65f04ab4 update init for containers for recent changes
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-08-10 14:57:53 +01:00
Justin Cormack
680fafd705 Merge pull request #140 from justincormack/device-cgroup
Add Cgroup resource limits into Yaml spec
2017-08-10 11:16:41 +01:00
Justin Cormack
13a1ffdd44 Add Cgroup resource limits into Yaml spec
This adds all the cgroup restrictions into the spec.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-08-09 16:39:10 +01:00
Justin Cormack
c2b081ed8a Merge pull request #137 from justincormack/efi-tar
Output EFI ISO as for BIOS ISO with filesystem on.
2017-08-07 17:45:26 +01:00
Justin Cormack
7b36db8358 Output EFI ISO as for BIOS ISO with filesystem on.
The image is multi-arch and should work on arm64 as it has no boot loader...

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-08-07 16:44:13 +01:00
Justin Cormack
b9de5ff4c6 Merge pull request #135 from justincormack/iso-tar
Use new style ISO BIOS mkimage from Linuxkit which unpacks filesystem
2017-08-02 14:46:50 +01:00
Justin Cormack
2d930bc8e5 Use new style ISO BIOS mkimage from Linuxkit which unpacks filesystem
Rather than using an initrd, unpack full filesystem for ISO BIOS.

Stream docker output direct to file rather than via a buffer, to save
memory.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-08-02 14:24:24 +01:00
Justin Cormack
305ad031e8 Merge pull request #134 from justincormack/hardlink-path
Fix hardlinks in tar output
2017-08-02 11:34:47 +01:00
Justin Cormack
48e42540d2 Fix hardlinks in tar output
When we converted these to cpio we were not noticing that they
were invalid as they had incorrect paths as we converted the
path to a symlink anyway. Only the busybox images have hard links
in, the Alpine ones are symlinks anyway, which is why it was
less visible too.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-08-01 17:04:57 +01:00
Justin Cormack
14a4d923ae Merge pull request #132 from justincormack/fix-ro
Fix read only output when defined in a label
2017-07-28 14:40:52 +01:00
Justin Cormack
3dec6855e0 Fix read only output when defined in a label
Also do some code cleanup.

Related to #131 we need to read the OCI config to find if the container
is read only, not rely on the yaml, as it may just be set in the label.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-07-28 14:34:18 +01:00
Justin Cormack
51005b42c5 Merge pull request #130 from justincormack/update-mkimage
Update mkimage used for building to lastest hashes
2017-07-28 13:57:49 +01:00
Justin Cormack
7010eae061 Update mkimage used for building to lastest hashes
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-07-28 13:35:59 +01:00
Justin Cormack
b65a8f86bc Merge pull request #129 from justincormack/ro-rw-setup
Rework setup of container for read only/read write
2017-07-28 11:10:53 +01:00
Justin Cormack
e388c0ff14 Rework setup of container for read only/read write
To work with truly immutable filesystems, rather than ones
we sneakily remount `rw`, we are going to use overlay for
writeable containers. To leave the final mount as `rootfs`,
in the writeable case we make a new `lower` path for the read
only filesystem, and leave `rootfs` as a mount point for an
overlay, with the writable layer and workdir mounted as a tmpfs
on `tmp`.

See https://github.com/linuxkit/linuxkit/issues/2288

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-07-27 14:52:13 +01:00
Justin Cormack
36217e5145 Merge pull request #128 from justincormack/resolvconf-init
In the init section use a symlink for /etc/resolv.conf
2017-07-25 15:39:34 +01:00
Justin Cormack
6403215635 In the init section use a symlink for /etc/resolv.conf
Unfortunately there are a lot of issues with resolv.conf as we
cannot actually write it into the image from any docker image, as docker will
always have something bind mounted in.

In addition, normally we expect the filesystem to br read only for images
that moby generates, so the actual etc/resolv.conf is likely not to be writeable.

Previously we were adding in a default resolv.conf into every image pointing at
Google's name servers but that is really a bad idea.

Instead, normal images now get an empty default, while images in the `init`
section will get a symlink, currently hard coded to `/run/resolvconf/resolv.conf`
but you can override this with the `files` section to be static or a different
link.

In future, if we have an easy way to build and extract images with user control
of this, we can drop this.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-07-25 14:40:40 +01:00
Justin Cormack
2c4d567781 Merge pull request #125 from justincormack/tmpdir
Add a tmp directory for each container to be used as a mount point
2017-07-24 17:19:32 +01:00
Justin Cormack
8e720bff08 Merge pull request #126 from ijc/containerd-alpha1-update
Containerd alpha1 update
2017-07-20 13:28:51 +01:00
Ian Campbell
feba1d7d98 Bump to image-spec v1.0.0 and runtime-spec v1.0.0
No substantive changes.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-07-20 12:23:09 +01:00
Ian Campbell
e8d5005b0e Synchronise vendoring with containerd v1.0.0-alpha1
Some of these are arbitrary and just syncing for the sake of it, however the
image- and runtime-spec are relevant. Interesting changes:

- runtime spec:
  - LinuxRLimit is now POSIXRLimit.
  - Specs.Config is now a pointer.
  - LinuxResources.DisableOOMKiller moved to
    LinuxResources.LinuxMemory.DisableOOMKiller
- image spec:
  - Platform.Features is removed (unused here).

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-07-20 12:03:22 +01:00
Ian Campbell
dec42921d7 Rerun vndr with latest version
This removes some files which are marked `// +build ignore`.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-07-20 12:03:22 +01:00
Justin Cormack
4720490c92 Add a tmp directory for each container to be used as a mount point
This is to clean up how we do writeable containers in LinuxKit.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-07-19 11:29:03 +01:00
Justin Cormack
a261a33812 Merge pull request #124 from justincormack/onshutdown
Add support for onshutdown
2017-07-18 14:17:53 +01:00
Justin Cormack
6eb74b2f2b Add support for onshutdown
This is a list of images to run on a clean shutdown. Note that you must not rely on these
being run at all, as machines may be be powered off or shut down without having time to run
these scripts. If you add anything here you should test both in the case where they are
run and when they are not. Most systems are likely to be "crash only" and not have any setup here,
but you can attempt to deregister cleanly from a network service here, rather than relying
on timeouts, for example.

Fix https://github.com/linuxkit/linuxkit/issues/1988

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-07-18 13:55:52 +01:00
Justin Cormack
43bd663816 Merge pull request #123 from justincormack/json-for-top-level
Add json config for top level config
2017-07-18 13:34:27 +01:00
Justin Cormack
55f7df577a Add json config for top level config
Otherwise JSON output as metadata cannot actually be used as it
has capitalised field names.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-07-18 13:16:58 +01:00
Justin Cormack
4105b7ea31 Merge pull request #122 from justincormack/metadata
Add a "metadata" file contents flag
2017-07-17 15:56:06 +01:00
Justin Cormack
5a013825dd Add metadata into test image
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-07-17 15:44:12 +01:00
Justin Cormack
12439d947d Do not modify data structure while building
This will give odd effects if we output the yaml structure into the image.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-07-17 15:42:26 +01:00
Justin Cormack
760521e197 Document metadata in files section
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-07-17 15:40:07 +01:00
Justin Cormack
040c500648 Add more omitempty to json spec
The metadata config was rather verbose.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-07-17 15:31:31 +01:00
Justin Cormack
389dd8c0fa Add a "metadata" file contents flag
Currently this supports "yaml" as the only option, which will output
the yaml config (as JSON) into the file specified in the image.

Fix #107

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-07-17 15:31:24 +01:00
Justin Cormack
f035995b22 Merge pull request #120 from riyazdf/system-pool-fix
trust: do not call x509.SystemCertPool as nil will use this as default
2017-07-14 22:53:24 +01:00
Riyaz Faizullabhoy
c3b2c7d575 trust: do not call x509.SystemCertPool as nil will use this as default
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2017-07-14 14:39:39 -07:00
Justin Cormack
f255d671c6 Merge pull request #117 from justincormack/uid
Allow uid, gid fields to be numeric or names
2017-07-14 18:05:12 +01:00
Justin Cormack
cc33e67492 Allow uid, gid fields to be numeric or names
Previously I was forcing them to be strings, which is horrible. Now you
can either specify a numeric uid or the name of a service to use the
allocated id for that service.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-07-14 16:57:12 +01:00
Justin Cormack
a824287800 Merge pull request #116 from justincormack/kernel-options
Allow specifying the kernel and tarball names, or omitting tarball
2017-07-14 14:32:53 +01:00
Justin Cormack
830be373da Allow specifying the kernel and tarball names, or omitting tarball
fix #113

Use `tar: none` or `tar: ""` to omit the tarball.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-07-14 14:09:42 +01:00
Justin Cormack
1664445ad6 Merge pull request #115 from justincormack/contrib-move
Move Contributing to top level
2017-07-14 11:55:04 +01:00
Justin Cormack
7bc763a628 Move Contributing to top level
- accidentally committed to wrong directory

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-07-14 11:50:51 +01:00
Justin Cormack
d12d1f12c0 Merge pull request #114 from dave-tucker/make
Makefile: Update for ease of Homebrew installation
2017-07-14 11:46:26 +01:00
Dave Tucker
5934a24206 Makefile: Update for ease of Homebrew installation
This removes the `lint` dependency from building Moby.
I've also added ineffassign to check ineffecutal assignments alongside
checks to ensure that both it and golint are installed.

Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
2017-07-14 10:03:44 +01:00
Justin Cormack
4db06aa173 Merge pull request #111 from ijc/master
Update LinuxKit components used for build
2017-07-13 14:48:38 +01:00
Ian Campbell
f20828bf7e Update LinuxKit components used for build
This updates to the current set of images as of
https://github.com/linuxkit/linuxkit/pull/2159

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-07-13 14:43:34 +01:00
Justin Cormack
75cc04a03d Merge pull request #109 from justincormack/contributing
Add Contributing doc
2017-07-12 12:20:14 +01:00
Justin Cormack
b4804b69e8 Add Contributing doc
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-07-12 12:04:33 +01:00
Justin Cormack
51b4e20154 Merge pull request #103 from ijc/master
Build for Darwin and Windows
2017-07-11 11:07:36 +01:00
Ian Campbell
6c6499bdd5 Update docker/docker vendor to 6978a6e25a2e6063f280ec842bd0f3eae99426e1
This includes https://github.com/moby/moby/pull/34040 which fixes Windows build
issues.

Note that this pulls in more than 500 (non merge) commits as well as the fix we
are interested in. A couple of new deps are pulled in, versions taken from
vendor/github.com/docker/docker/vendor.conf.

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2017-07-11 10:47:39 +01:00
Justin Cormack
5bf74cbfa9 Merge pull request #105 from justincormack/unique-names
Error if there are duplicate service names
2017-07-11 10:22:05 +01:00
Justin Cormack
3ee4fdc43a Error if there are duplicate service names
Continue to allow onboot to have duplicates as we do not run simultaneously
so that is ok (and we number them anyway), but services are run together
so we will get a runtime error if duplicated as this is the containerd/runc
id.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-07-10 14:50:04 +01:00
Ian Campbell
3c5fad4539 Remove dependency on docker/docker/cli
We were pulling in this whole stack of packages just for `trust.ReleasesRole`.
Just define it locally.

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2017-07-10 14:38:21 +01:00
Justin Cormack
ec7e73b304 Merge pull request #100 from justincormack/userns
Add partial user namespace support
2017-07-10 14:30:30 +01:00
Ian Campbell
5e75f8ca8b Only run go test and go vet if not cross building (i.e. ${GOOS} unset)
They will try to run things and hence cannot be done when cross building.

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2017-07-07 10:27:19 +01:00
Ian Campbell
48f1dd042f Build for Darwin and Windows in CI
Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2017-07-06 17:51:43 +01:00
Justin Cormack
d87a3f9990 Merge pull request #102 from ijc/master
revendor runc + runtime-spec to match containerd 8e1a04ff9ee3
2017-07-06 16:57:01 +02:00
Ian Campbell
c3edfec759 revendor runc + runtime-spec to match containerd 8e1a04ff9ee3
Note that various fields have changed moved around in the JSON as a result:

* `Platform` has been removed.
* `Process` is now a pointer.
* `OOMScoreAdj` has moved into `Process`, from `Linux.Resources` (resolving a
  TODO here).

Also updates golang.org/x/sys which is less critical.

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2017-07-06 15:34:01 +01:00
Justin Cormack
a73c3d3667 Add partial user namespace support
This adds the OCI parts needed into the yaml, but there are still
permissions issues in practise so marked as experimental.

It may just need further documentation to resolve the issues.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-07-03 14:45:58 +01:00
Justin Cormack
c7c4c9ef2a Merge pull request #98 from justincormack/named-uids
Assign each container a uid and gid it can use
2017-06-30 19:40:47 +01:00
Justin Cormack
0acaaa71fe Assign each container a uid and gid it can use
In order to support not running containers as root, allocate
each of them a uid and gid, a bit like traditional Unix system
service IDs. These can be referred to elsewhere by the name of
the container, eg if you wish to create a file owned by a
particular esrvice.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-06-30 17:40:08 +01:00
Justin Cormack
e9b9c56137 Merge pull request #99 from justincormack/ambient-docs
Add docs for ambient capabilities
2017-06-30 17:17:46 +01:00
Justin Cormack
c5070dfc8c Add docs for ambient capabilities
Missed in intitial PR.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-06-30 17:05:34 +01:00
Justin Cormack
5f49f6695a Merge pull request #97 from justincormack/ambient
Add support for ambient capabilities
2017-06-30 14:41:40 +01:00
Justin Cormack
66b4aed239 Add support for ambient capabilities
Allow setting ambient capabilities, as a seperate option to the standard
ones. If you are running as a non root user you should use these.

Note that unless you add `CAP_DAC_OVERRIDE` and similar permissions you
need to be careful about file ownership. Added support to set ownership
in the `files` section to help out with this.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-06-30 14:08:16 +01:00
Justin Cormack
70c5c2e1a0 Merge pull request #94 from davefreitag/ibm-vhd
Adding 'dynamic-vhd' Output Format
2017-06-27 15:29:20 +01:00
Justin Cormack
518fd2b0d6 Merge pull request #93 from tych0/check-caps
check that caps are valid
2017-06-27 15:28:52 +01:00
Tycho Andersen
c2e460fee5 check that caps are valid
Rather than build the image and have something weird happen, let's check
that the capabilities specified are actually valid capabilities.

Signed-off-by: Tycho Andersen <tycho@docker.com>
2017-06-27 08:25:10 -06:00
Dave Freitag
b605e61d1f Adding dynamic-vhd Output Format
Adding support for the dynamic-vhd output format.

Signed-off-by: Dave Freitag <dcfreita@us.ibm.com>
2017-06-27 08:53:56 -05:00
Justin Cormack
31384b6780 Merge pull request #91 from justincormack/library
Split out into a small stub command line and a library
2017-06-23 11:58:18 -07:00
Justin Cormack
e7ebabdb05 Split out into a small stub command line and a library
- this is pretty much the smallest change to split this out and it
  exposes a few things that can be improved later
- no change to logging yet

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-06-21 16:19:31 -07:00
Justin Cormack
a7e3fd29b4 Merge pull request #90 from justincormack/dockerinput
Rename the docker run function
2017-06-21 11:17:07 -07:00
Justin Cormack
4401e7d0f0 Rename the docker run function
This is a remnant of when there were multiple versions.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-06-21 11:10:38 -07:00
Justin Cormack
c9d8739b32 Merge pull request #86 from justincormack/error
Return errors from build internal function
2017-06-20 20:16:42 -07:00
Justin Cormack
c5cccad62e Return errors from build internal function
This makes it easier to convert to a library.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-06-20 17:25:16 -07:00
Justin Cormack
7149b0f7b8 Merge pull request #85 from justincormack/empty
Allow creation of empty files
2017-06-20 13:34:09 -07:00
Justin Cormack
618dc424de Allow creation of empty files
- change to a pointer type so we can distinguish empty from unset.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-06-20 13:25:36 -07:00
Justin Cormack
b928a9b203 Merge pull request #84 from justincormack/rlimit
Add support for rlimits
2017-06-18 15:37:04 -07:00
Justin Cormack
ad3de8f858 Add support for rlimits
Use a microformat eg `nofile,100,200`. You can use `unlimited`
to set no limit.

Needed for https://github.com/linuxkit/linuxkit/issues/1852

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-06-17 16:37:24 -07:00
Justin Cormack
2e22b3adc6 Merge pull request #83 from justincormack/hyperkit-support
Use hyperkit to make raw disks
2017-06-15 16:31:59 -07:00
Justin Cormack
13da5e08ea Use hyperkit to make raw disks
- enable the hyperkit option by default on MacOS
- use it for creating raw disk images

fix #68

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-06-15 15:10:55 -07:00
Justin Cormack
d8cc1b3f08 Merge pull request #82 from justincormack/source-ifpresent
Allow some files specified with `source` to be optional
2017-06-15 11:22:21 -07:00
Justin Cormack
4d64a46ae9 Allow some files specified with source to be optional
See discussion in https://github.com/linuxkit/linuxkit/pull/2027

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-06-15 11:07:58 -07:00
Justin Cormack
d534273407 Merge pull request #81 from ijc/no-default-hostname
Do not force default hostname `moby`.
2017-06-13 17:42:18 +02:00
Ian Campbell
755c6a0bf7 Do not force default hostname moby.
This disables the code in LinuxKit's `/bin/rc.init` which attempts to detect an
unconfigured hostname and generate a unique (ish) version from the MAC address.

Anyone who wants a specific fallback hostname can populate `etc/hostname`
through the `files` stanza in their `yml` file.

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2017-06-13 16:37:42 +01:00
Justin Cormack
464396c63f Merge pull request #80 from justincormack/http-fetch-yaml
Add support to fetch yaml file with http
2017-06-13 16:58:51 +02:00
Justin Cormack
d7ca674ea6 Add support to fetch yaml file with http
For example you can do
```
moby build https://raw.githubusercontent.com/linuxkit/linuxkit/master/linuxkit.yml
```

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-06-12 18:11:21 +02:00
Justin Cormack
90fd3e7e41 Merge pull request #79 from justincormack/tilde
Allow ~ for home directory when specifying source of file
2017-06-12 16:43:28 +02:00
Justin Cormack
1988b312d2 Allow ~ for home directory when specifying source of file
Useful when adding ssh keys

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-06-12 16:37:00 +02:00
Justin Cormack
e94d0d8093 Merge pull request #78 from justincormack/add-initrd
Move the initrd library to this repo
2017-06-12 15:43:47 +02:00
Justin Cormack
322d06f906 Update vendoring to use initrd library from this repo
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-06-12 15:36:30 +02:00
Justin Cormack
528b430789 Clean up initrd creation library
Remove duplicated code and clean up file handling a little.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-06-12 15:34:30 +02:00
Justin Cormack
ddc92b8846 Code in the initrd generator to split a single tarball
In the WIP code in `moby` we now have a standard base tarball format,
that includes the kernel and cmdline as files in `/boot` so that the
entire output of the yaml file can default to a single tarball. Then
this can be split back up by LinuxKit into initrd, kernel and cmdline
as needed. This will probably become the only output of the `moby build`
stage, with a `moby package` stage dealing with output formats.

We may remove the output format specification from the yaml file as well,
and just have it in the command.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-06-12 15:34:22 +02:00
Justin Cormack
ecf14815f7 Update Go path to linuxkit/linuxkit for libraries
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-06-12 15:34:11 +02:00
Tycho Andersen
c313e39250 init: fake supporting hard links slightly differently
Instead, make a hard link a symlink. This isn't much better, but it allows
some cases (e.g. installing GCC on moby via alpine) to work.

Signed-off-by: Tycho Andersen <tycho@docker.com>
2017-06-12 15:34:02 +02:00
Justin Cormack
6bce274b81 Move Go code to src/cmd
This does not get everything where we want it finally, see #1266
nor the optimal way of building, but it gets it out of top level.

Added instructions to build if you have a Go installation.

Not moving `vendor` yet.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-06-12 15:33:53 +02:00
Justin Cormack
49002e7a1d Out with the old, in with the new Moby
- remove remainder of editions code
- add a new check container to run tests without Docker
- switch over `make test` to use new command to build tests

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-06-12 15:33:45 +02:00
Justin Cormack
ed832e185f Rough first version of the moby tool
- terrible code
- lots needs changing
- can build a Moby from a config yaml that boots

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-06-12 15:33:34 +02:00
Justin Cormack
6b4bae6832 Merge pull request #77 from justincormack/tar-abs
Remove absolute paths from files
2017-06-09 11:49:26 +01:00
Justin Cormack
796d943054 Remove absolute paths from files
tarballs should only have relative paths in.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-06-09 11:39:52 +01:00
Justin Cormack
e7fc277fd2 Merge pull request #76 from justincormack/docs
Add docs
2017-06-08 15:53:54 +01:00
Justin Cormack
eea5c6f126 Updates to the docs
Some of this was out of date or missing.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-06-08 15:45:49 +01:00
Justin Cormack
0eb4a49b24 Import yaml documentation from LinuxKit
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-06-08 14:58:29 +01:00
Justin Cormack
35ee128bfd Merge pull request #75 from justincormack/perm
Allow setting of mode in files section
2017-06-08 14:54:39 +01:00
Justin Cormack
83c166d3f2 Allow setting of mode in files section
Also keep track of directory creation there, so you can explicitly
set directory permissions if required, and to avoid duplicates.

We should really keep track of files created elsewhere in the build
as well as we still might create some extras, but at least you can
set the write permisisons.

We can add uid, gid support too if required...

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-06-08 14:44:02 +01:00
Justin Cormack
e0aac90f44 Merge pull request #74 from justincormack/raw-name
Fixes for output types
2017-06-07 16:52:35 +01:00
Justin Cormack
98732e8936 Fixes for output types
Make `raw` output type call its file `.raw` as well, other minor fixes.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-06-07 16:46:36 +01:00
Justin Cormack
68ffbb5e7e Merge pull request #72 from justincormack/rename-images
Rename img→raw and gcp-img→gcp
2017-06-07 16:38:29 +01:00
Justin Cormack
d906292096 Merge pull request #73 from justincormack/docker
Add an output format for running images with Docker
2017-06-07 16:38:14 +01:00
Justin Cormack
9a3ac36236 Add an example of building an application and running in Docker or LinuxKit
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-06-07 16:24:32 +01:00
Justin Cormack
dbe50976c3 Add suitable init for running in a container
This goes with the experimental `docker` output format.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-06-07 15:33:52 +01:00
Justin Cormack
8abeffde59 Add Docker output format
This will add a Dockerfile which will build the contents into an
image and then call `tinit` to start it.

This is fairly experimental, but is a prototype for other non
LinuxKit outputs. The container will need to run as `privileged`
as `runc` needs quite a few capabilities and `containerd` needs to
mount.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-06-07 15:32:02 +01:00
Justin Cormack
eabe03b702 Rename img→raw and gcp-img→gcp
- generally people refer to a plain disk image as `raw`
- `gcp` is shorter and it is the only image type supported
- remove `img-gz` as it is not needed. It does not really save space
  as you have to build the full image and compress it anyway. On
  many platforms the `raw` image will be a sparse file anyway,
  even on the Mac soon.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-06-07 14:43:43 +01:00
Justin Cormack
ca677b3c40 Merge pull request #71 from justincormack/output-file
Use streaming output where possible
2017-06-07 14:28:44 +01:00
Justin Cormack
c2806000e0 Use streaming APIs rather than buffers for building
This should lower memory usage a lot and should be faster.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-06-07 12:13:12 +01:00
Justin Cormack
b086231008 Allow streaming output for tar
This is a little ugly in terms of the validation now, but it is a move towards
splitting "build" and "package".

The "tar" output (and soon others) can output direct to a file or to stdout.
Obviously you can only build a single output format like this.

The LinuxKit output formats that build disk images cannot stream as they
have to build whole images. These allow multiple outputs.

In future we will probably change to
```
moby build | moby package
```

or similar, but that is a bit ugly, so currently have a compromise where
there are essentially two output types.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-06-06 14:50:28 +01:00
Justin Cormack
181c66d42c Merge pull request #70 from justincormack/multiple-yaml
Allow specification of multiple yaml files for a single build
2017-06-05 16:39:31 +01:00
Justin Cormack
3a16c02f10 Merge pull request #69 from justincormack/gcp-fix
Do not use Linuxkit to build GCP images for now
2017-06-05 15:37:48 +01:00
Justin Cormack
e879037646 Disable use of linuxkit for GCP for now
GCP does not recognise the images, even though they appear identical to those made
by libguestfs and work on qemu fine. Their validation code does not like them for some
reason.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-06-05 15:31:45 +01:00
Justin Cormack
503545a2de Merge pull request #67 from riyazdf/trust-caching
trust: check local image cache to not pull every time
2017-06-04 19:31:47 +01:00
Justin Cormack
54e58f2808 Allow specification of multiple yaml files for a single build
Each section will be appended in order of the CLI, other then
kernel where last specified one wins.

This is useful if you eg want to have a base version for (say)
AWS and GCP and then add your own image on top.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-06-04 17:50:13 +01:00
Riyaz Faizullabhoy
6c6190172c trust: include trust configuration in docker inspect for OCI config
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2017-06-02 15:18:55 -07:00
Justin Cormack
058ce768f4 Merge pull request #66 from justincormack/linuxkit-part2
Add the temporary directories under ~/.moby
2017-06-02 22:39:41 +01:00
Justin Cormack
5b73f53dcf Put tmp direcories under ~/.moby
Docker4Mac won't bind mount default tmp dir into containers

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-06-02 22:36:21 +01:00
Riyaz Faizullabhoy
6221552204 trust: check local image cache to not pull every time
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2017-06-02 13:03:47 -07:00
Justin Cormack
294389aef9 Merge pull request #49 from justincormack/linuxkit
Use linuxkit to build qcow2 and raw image disks, rather than docker containers with libguestfs
2017-06-02 16:39:28 +01:00
Justin Cormack
249bbc56ed Use linuxkit to build qcow2 and raw image disks, rather than docker containers with libguestfs
- does not require docker if user has qemu natively, will still fall back to docker
- allow specifying size for fixed size disk images
- add a raw disk output format
- more dogfooding
- marginally slower, but can be improved later

The images used to do the build are cached to make the process quicker.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-06-02 16:33:06 +01:00
Justin Cormack
d599aedb7f Merge pull request #62 from riyazdf/config-dir-trust
add default trust config and cache dir
2017-06-02 16:25:52 +01:00
Riyaz Faizullabhoy
46b77f699f add default config and cache dir, initially use for trust
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2017-06-02 08:14:03 -07:00
Justin Cormack
dd60edc884 Merge pull request #65 from justincormack/mobydir
Add a ~/.moby directory for config
2017-06-02 15:16:31 +01:00
Justin Cormack
cf8d8ca014 Add a ~/.moby directory for config
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-06-02 15:12:00 +01:00
Justin Cormack
cde8329d2f Merge pull request #61 from FrenchBen/validate-output
Validate output before doing the work
2017-06-01 22:39:56 +01:00
Justin Cormack
edcf4d0362 Merge pull request #59 from riyazdf/trust-parse-fixes-and-tests
trust: parsing fixes and tests
2017-06-01 22:35:59 +01:00
French Ben
23856c1e46 Validate output before doing the work
Signed-off-by: French Ben <frenchben@docker.com>
2017-06-01 14:30:41 -07:00
Riyaz Faizullabhoy
e0fc007b5a test cases with default golang lib
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2017-06-01 11:27:01 -07:00
Riyaz Faizullabhoy
99eeb981a7 trust: improve org checks to enable library official repo checks
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2017-06-01 11:20:36 -07:00
Justin Cormack
dec7f8bb2b Merge pull request #58 from riyazdf/disable-trust-flag
add disable-content-trust flag for one-off build
2017-06-01 10:52:36 +01:00
Riyaz Faizullabhoy
32f167bd9e trust: fix splitting on tags and digests and add tests
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2017-05-31 16:42:42 -07:00
Riyaz Faizullabhoy
1ecfc11160 add disable-content-trust flag for one-off build
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2017-05-31 14:51:59 -07:00
Justin Cormack
5cd1e4e2ae Merge pull request #56 from justincormack/host-root
Change the default namespaces
2017-05-30 15:35:01 +01:00
Justin Cormack
dfd57aeeee Change the default namespaces
Default to sharing net, ipc, uts namespaces between containers in config.
This makes most sense, as this is normal other than if we want to specifically
isolate system containers, in which case we will specify in config.

- explicitly support the value "new" if you want to isolate
- support the synonym "root" for "host" as in non LinuxKit setups it may
  not actually be the host, it will be the current namespace.
- only support "none" as a synonym for "new" for network namespace where it is
  carried over from Docker.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-05-30 14:41:33 +01:00
Justin Cormack
101fa30ef3 Merge pull request #54 from riyazdf/trust-tag-fix
trust: always tag after pull
2017-05-27 10:33:27 +01:00
Riyaz Faizullabhoy
81d17913d1 trust: always tag after pull
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2017-05-26 18:44:58 -07:00
Justin Cormack
5111146a4f Merge pull request #53 from riyazdf/rbind
Always include rbind in user-specified volume options
2017-05-26 23:56:06 +01:00
Riyaz Faizullabhoy
11ebab55e2 Always include rbind in user-specified options
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2017-05-26 15:39:57 -07:00
Justin Cormack
4e4629e05c Merge pull request #51 from riyazdf/trust-tmpdir
trust: use a tempdir and remove after build
2017-05-26 22:47:37 +01:00
Riyaz Faizullabhoy
92aa526b9d trust: use a tempdir and remove after build
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2017-05-26 14:29:44 -07:00
Justin Cormack
e8dc61e910 Merge pull request #48 from justincormack/dir-fixes
Fix build in directory
2017-05-26 15:28:18 +01:00
Justin Cormack
b8cdb985fd Fix build in directory
Remove unnecessary argument to buildInternal function, does not need to know the name.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-05-26 15:22:12 +01:00
Justin Cormack
2cd3a5b141 Merge pull request #47 from justincormack/dir
Add a -dir option for location of output files
2017-05-26 15:02:29 +01:00
Justin Cormack
f73558a98a Add a -dir option for location of output files
Fix #17

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-05-26 14:53:17 +01:00
Justin Cormack
5de12a0085 Merge pull request #46 from justincormack/gitignore
Fix gitignore to not ignore moby directory
2017-05-26 14:47:45 +01:00
Justin Cormack
27709ce1c0 Fix gitignore to not ignore moby directory
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-05-26 14:45:19 +01:00
Justin Cormack
1cb9fab3e1 Merge pull request #45 from justincormack/clean
Add make clean, .gitignore
2017-05-26 13:34:06 +01:00
Justin Cormack
f6b9076649 Merge pull request #43 from justincormack/outputs-not-in-yaml
Remove output formats from the Yaml file, put in CLI
2017-05-26 13:33:17 +01:00
Justin Cormack
cbbedbfc57 Remove output formats from the Yaml file, put in CLI
This removes outputs from yaml, instead you can do
```
moby build -output tar -output qcow2 file.yaml
```
or alternative syntax
```
moby build -output tar,qcow2 file.yaml
```

In future we may change this to be available in a `moby package`
step, but lets try this for now.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-05-26 13:00:45 +01:00
Justin Cormack
dfd1cd9c1c Add make clean, .gitignore
Also tidy Makefile a bit

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-05-26 12:47:06 +01:00
Justin Cormack
f65146c844 Merge pull request #41 from riyazdf/remove-run
Remove docker run function as it is unused
2017-05-26 10:43:56 +01:00
Justin Cormack
ff4a19c5fb Merge pull request #44 from AkihiroSuda/fix-tmpfs
config: fix tmpfs parsing
2017-05-26 10:42:22 +01:00
Akihiro Suda
41c536908d config: fix tmpfs parsing
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2017-05-26 08:24:48 +00:00
Riyaz Faizullabhoy
dfca3b9775 Remove docker run function as it is unused
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2017-05-23 13:30:29 -07:00
Justin Cormack
b47f3dec4a Merge pull request #27 from chanwit/add_source
add Source attribute to File
2017-05-22 11:28:06 +01:00
Justin Cormack
339aa5ec86 Merge pull request #39 from justincormack/nullable
Add support for override of parameters using a label
2017-05-18 23:09:37 +01:00
Justin Cormack
c734b47e9c Add support for override of parameters using a label
Using the label `org.mobyproject.config` will use that JSON
(or yaml, but it is very hard to get yaml into a label as newlines are
not respected) for parameters that are not explicitly set in the yaml file.

Had to change parameter definitions so override behaves as expected.

fix #16

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-05-18 17:48:15 +01:00
Justin Cormack
df7f50a755 Merge pull request #37 from riyazdf/circle-fix
Fixup circle CI
2017-05-15 19:59:51 +01:00
Riyaz Faizullabhoy
57f1a5bdf2 Fixup circle CI
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2017-05-15 11:55:53 -07:00
Justin Cormack
219847ff1a Merge pull request #36 from riyazdf/fix-circle
Update working dir and get golint for circle tests
2017-05-15 18:25:45 +01:00
Riyaz Faizullabhoy
62f8a69b38 Update working dir and get golint for circle tests
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2017-05-15 10:17:16 -07:00
Justin Cormack
b48e969bf8 Merge pull request #34 from riyazdf/simple-test
Simple test target
2017-05-15 17:59:22 +01:00
Riyaz Faizullabhoy
039e4f6f60 Change to tar output
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2017-05-15 09:58:26 -07:00
Justin Cormack
d7611ee0e3 Merge pull request #35 from justincormack/windows-fixes
Update vendoring for Windows support
2017-05-15 17:36:29 +01:00
Justin Cormack
5a226337a9 Update vendoring for Windows support
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-05-15 17:32:10 +01:00
Riyaz Faizullabhoy
d020a54aa7 Sample circle yml, not hooked in yet
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2017-05-15 09:27:34 -07:00
Riyaz Faizullabhoy
39d74773fc Simple make test target
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2017-05-15 09:27:29 -07:00
Justin Cormack
a9a00fae62 Merge pull request #33 from justincormack/img-gz
Add a compressed disk image format
2017-05-12 14:43:13 +01:00
Justin Cormack
1274f81f81 Add a compressed disk image format
This is a fairly generic bootable disk with syslinux. Should
work if you dd it onto a USB stick, and should also work for AWS.

You need to uncompress it of course! Default size is 1G.

Will add cli option to set the size once I split out `moby build`
and `moby package` shortly.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-05-12 14:29:14 +01:00
Justin Cormack
1135cdddcc Merge pull request #32 from justincormack/fix-pull
Fix docker pull
2017-05-12 13:08:17 +01:00
Justin Cormack
0ade84e151 Fix docker pull
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-05-12 13:04:19 +01:00
Justin Cormack
91e78b73b9 Merge pull request #31 from justincormack/fix-exec
Add missing import
2017-05-12 11:42:03 +01:00
Justin Cormack
8a71fbdbb6 Add missing import
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-05-12 11:41:37 +01:00
Justin Cormack
9afbc24c79 Merge pull request #30 from riyazdf/revert-run-api
Revert "Use Docker API for run"
2017-05-12 11:31:33 +01:00
Justin Cormack
4bef9648f9 Merge pull request #18 from riyazdf/docker-pull-api
implement docker pull using docker API + notary library
2017-05-12 11:30:49 +01:00
Riyaz Faizullabhoy
e26f2878d3 Revert "Use Docker API for run"
This reverts commit ec6fea1d67.
2017-05-11 17:32:32 -07:00
Chanwit Kaewkasi
d83c35259a add Source attribute to File
Signed-off-by: Chanwit Kaewkasi <chanwit@gmail.com>
2017-05-12 01:01:53 +07:00
Riyaz Faizullabhoy
9afeda3c78 Vendoring for notary
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2017-05-11 10:11:38 -07:00
Riyaz Faizullabhoy
abf0028ee8 Use docker and notary API for pull
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2017-05-11 10:11:19 -07:00
Justin Cormack
ba07bbfb0d Merge pull request #26 from justincormack/gitignore-del
Remove .gitignore
2017-05-10 17:00:17 +01:00
Justin Cormack
0ea9dfdfe1 Remove .gitignore
Was ignoring too much...

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-05-10 16:59:25 +01:00
Justin Cormack
11b913606d Merge pull request #11 from riyazdf/run-api
Use Docker API for run
2017-05-09 16:31:57 +01:00
Justin Cormack
0a06eb2cea Merge pull request #25 from justincormack/fix-symlinks-misc
Fix symlinks handling in initramfs
2017-05-09 13:54:17 +01:00
Justin Cormack
fbdd5047dd Update linuxkit vendor
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-05-09 13:45:48 +01:00
Justin Cormack
6187570b7a Add missing Close in initrd creation
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-05-09 13:34:41 +01:00
Justin Cormack
cc2a3a645f Add support for symlinks in files section
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-05-09 13:15:11 +01:00
Justin Cormack
96ae98d2d5 Do not log information about empty sections
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-05-09 13:12:51 +01:00
Justin Cormack
e25033f70d Allow no kernel to be specified
This is needed for non LinuxKit use cases.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-05-09 13:03:58 +01:00
Justin Cormack
a1b24b4de2 Merge pull request #24 from MagnusS/fix-build
Don't exit after pulling init or kernel image without -pull
2017-05-08 20:14:03 +01:00
Magnus Skjegstad
09c2904994 Don't exit after pulling init or kernel image
Due to a missing else the tool would previously terminate with an error
message showing that the kernel or init image didn't exist, even if it
was pulled successfully. Invoking the tool again would continue to the
next image.

Signed-off-by: Magnus Skjegstad <magnus@skjegstad.com>
2017-05-08 20:48:20 +02:00
Justin Cormack
86b4d1cdb2 Merge pull request #23 from justincormack/fmt
Go fmt
2017-05-08 17:50:44 +01:00
Justin Cormack
7c33eb81b6 Go fmt
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-05-08 17:50:11 +01:00
Justin Cormack
aa51e43be9 Merge pull request #22 from justincormack/tar-boot-rework
Add tar output format
2017-05-08 17:31:01 +01:00
Justin Cormack
dd08b2b70a Add tar output format
Add a canonical single tarball output format. This
adds kernel and cmdline to `/boot` where LinuxKit output
formats will find them.

Make the other output formats use that as a base.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-05-08 17:19:08 +01:00
Justin Cormack
30d6bc5f5a Merge pull request #21 from justincormack/vndr-cleanup
Revendor with a newer `vndr`
2017-05-08 17:12:05 +01:00
Justin Cormack
20bf9d44ea Revendor with a newer vndr
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-05-08 17:10:44 +01:00
Justin Cormack
3e3eec7642 Merge pull request #13 from riyazdf/linting
Add standard lint tools to Makefile
2017-05-03 16:47:09 +01:00
Riyaz Faizullabhoy
b93922a1c5 Add standard lint tools to Makefile
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2017-05-01 10:49:54 -07:00
Justin Cormack
45a3e4ccd2 Merge pull request #15 from alexellis/support_none
Support `capabilities: none` in YML - Fix #14
2017-05-01 16:35:57 +01:00
Alex Ellis
b046618027 Support none as capabilities.
Signed-off-by: Alex Ellis <alexellis2@gmail.com>
2017-05-01 16:08:23 +01:00
Justin Cormack
0b149e7c83 Merge pull request #12 from riyazdf/img-not-found-err
Use IsErrNotFound to tighten err handling
2017-05-01 11:22:28 +01:00
Riyaz Faizullabhoy
95a9a4ff67 Use IsErrNotFound to tighten err handling
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2017-04-28 10:50:58 -07:00
Riyaz Faizullabhoy
ec6fea1d67 Use Docker API for run
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2017-04-28 10:45:37 -07:00
Justin Cormack
d504afe479 Merge pull request #10 from justincormack/pull-before-create
Make sure we always pull images if create fails
2017-04-28 16:23:36 +01:00
Justin Cormack
d0f867e9b2 Make sure we always pull images if create fails
`docker create` will not pull an image so we need an additional fallback.

Rework the pull and trust code so it is in one place to facilitate this.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-04-28 16:14:15 +01:00
Justin Cormack
dbd2593328 Merge pull request #8 from justincormack/no-bzimage
Switch from bzImage to kernel for kernel image
2017-04-28 13:56:59 +01:00
Justin Cormack
ef017ac223 Support both kernel and bzImage for now
Also do not require `tar` to be in container, use the standard
image export code that we already have and find the files we
want.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-04-28 12:48:04 +01:00
Justin Cormack
2cd9bead88 Switch from bzImage to kernel for kernel image
This was too architecture specific previously.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-04-28 12:38:04 +01:00
Justin Cormack
3375f32d51 Merge pull request #9 from riyazdf/docker-api-usage
Use Docker API for part of tool
2017-04-28 11:48:52 +01:00
Riyaz Faizullabhoy
37f57cfa84 Use Docker API for rm, create, export, and inspect
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2017-04-27 14:09:17 -07:00
Riyaz Faizullabhoy
fcdfe5c356 vendor new client and api
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2017-04-27 13:31:16 -07:00
Justin Cormack
4694f5a7ec Merge pull request #7 from justincormack/makefile
Add a simple Makefile
2017-04-27 14:29:26 +01:00
Justin Cormack
719025a708 Add a simple Makefile
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-04-27 14:25:07 +01:00
Justin Cormack
7517c830d7 Merge pull request #6 from AkihiroSuda/stdin
build: support reading yaml from stdin
2017-04-27 14:12:34 +01:00
Akihiro Suda
d98f23c2ba build: support reading yaml from stdin
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2017-04-25 10:26:34 +00:00
Justin Cormack
75a784f74b Merge pull request #3 from justincormack/clean-vendor
Clean vendor directory
2017-04-25 00:07:00 +01:00
Justin Cormack
08e1ca0795 Clean vendor directory
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-04-25 00:06:11 +01:00
Justin Cormack
3527ecc6d9 Merge pull request #2 from justincormack/license
Add license files
2017-04-24 23:09:21 +01:00
Justin Cormack
ba3d79a258 Add license files
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-04-24 23:08:30 +01:00
Justin Cormack
8fa71bd1a9 Merge pull request #1 from justincormack/vendor
Add vendoring and move to cmd
2017-04-24 23:07:08 +01:00
Justin Cormack
fa88ca8ede Move src/cmd to cmd
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-04-24 22:58:37 +01:00
Justin Cormack
81288f9221 Add vendoring
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-04-24 22:56:08 +01:00
Justin Cormack
8968335e59 Split cli into moby and linuxkit
moby just does the simple `build` cases, while `linuxkit` does
`push` and `run`.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-04-24 20:03:22 +01:00
Justin Cormack
4e1317d213 Split build and push, and remove push code from run
This currently only changes the `gcp` target, but is the new
model - the `build` command will only do things locally, then
you need to `push` to an image store such as GCP or other ones
in order to `run` for platforms that cannot boot directly from
a local image.

Fix #1618

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-04-24 17:12:05 +01:00
Dave Tucker
b556f51b47 moby: Add container fallback for moby run qemu
This commit allows moby run qemu to fallback to using a container if
qemu isn't installed on the host OS

Signed-off-by: Dave Tucker <dt@docker.com>
2017-04-24 15:16:57 +01:00
Rolf Neugebauer
9deb9c044d src: Use hyperkit from the the moby org
HyperKit got moved from docker to moby. Update vendoring and
imports.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-24 10:53:59 +01:00
Riyaz Faizullabhoy
c1a5c412fb Merge pull request #1653 from dave-tucker/ltp-ci
Changes required to run LTP tests in CI
2017-04-23 13:22:40 -07:00
Dave Tucker
327138876a moby: add skip-cleanup flag to moby run gcp
This is used as the CI will cleanup after itself

Signed-off-by: Dave Tucker <dt@docker.com>
2017-04-19 16:02:48 +01:00
Daniel Finneran
85b33baf58 Fix for prefix for linuxkit
Signed-off-by: Dan Finneran <daniel.finneran@gmail.com>
2017-04-18 19:00:31 -05:00
solidnerd
bd8017a4e1 Rename package initrd in build.go
This will rename github.com/docker/moby/src/initrd to github.com/linuxkit/linuxkit/src/initrd

Signed-off-by: solidnerd <niclas@mietz.io>
2017-04-18 20:19:21 +02:00
Rolf Neugebauer
49d735bc2f cli: Unify environment variables for GCP run
GCP defines some "standard" environment variables for project and
zone. Use them for 'moby run gcp'. Change the other environment
variables to follow the same pattern.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-15 12:36:46 -05:00
Rolf Neugebauer
481d584659 cli: Update images to use the linuxkit hub org
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-12 21:28:17 +01:00
Ilya Dmitrichenko
31f5a0baa8 Generate VM UUID
Signed-off-by: Ilya Dmitrichenko <errordeveloper@gmail.com>
2017-04-12 17:33:26 +01:00
Thomas Gazagnaire
4504e6d386 fix yaml validation for image mounts
Signed-off-by: Thomas Gazagnaire <thomas@gazagnaire.org>
2017-04-12 15:28:02 +02:00
Justin Cormack
8f18d92bee Merge pull request #1599 from avsm/packet-net-run
Add `moby run packet` to boot on baremetal Packet.net hosts
2017-04-12 13:40:50 +01:00
Thomas Gazagnaire
b9a964060b better comment in converter for yaml validation
Signed-off-by: Thomas Gazagnaire <thomas@gazagnaire.org>
2017-04-12 14:10:27 +02:00
Anil Madhavapeddy
0175778e83 Add moby run packet to boot on baremetal Packet.net hosts
This uses the Packet.net API and iPXE to boot a Moby host.
There are several enhancements coming soon, such as SSH key
customisation, but this PR is sufficient to boot a host and
then use the web interface to get console access.

The user must currently upload the built artefacts to a public
URL and specify it via --base-url, e.g.:
moby run packet --api-key <key> --project-id <id> \
  --base-url http://recoil.org/~avsm/ipxe --hostname test-moby packet

See #1424 #1245 for related issues.

Signed-off-by: Anil Madhavapeddy <anil@docker.com>
2017-04-12 12:59:05 +01:00
Thomas Gazagnaire
02038f512d Add Yaml validation
Fix #1292

Transform the Yaml struct to JSON and validate it against a JSON schema.

Signed-off-by: Thomas Gazagnaire <thomas@gazagnaire.org>
2017-04-12 13:42:15 +02:00
Justin Cormack
c9c6d20a45 Merge pull request #1596 from thebsdbox/qemu_raw_disk
Fixed qemu argument typo and also correct use of raw disk
2017-04-12 12:03:33 +01:00
thebsdbox
f7210ab4b4 Fixed qemu argument typo and also correct use of raw disk
Signed-off-by: Dan Finneran <daniel.finneran@gmail.com>
2017-04-12 11:19:58 +01:00
Dave Tucker
d5264ac9e7 moby: Add system disk and disk size parameter to GCP
This makes gcp behave in a similar way to the qemu backend.
The minimum size on GCP 1GB, whereas qemu uses 256MB.
Without this, the LTP tests fail on GCP.

Signed-off-by: Dave Tucker <dt@docker.com>
2017-04-12 00:52:01 +01:00
Dave Tucker
52f62bb30c moby: enable internet access for GCP VM's
Adds an "access config" with a type of "ONE_TO_ONE_NAT" that
allows an instance to obtain an ephemeral IP address and access the
internet

Signed-off-by: Dave Tucker <dt@docker.com>
2017-04-11 23:36:31 +01:00
thebsdbox
b6e8d4fd63 Added Linux $PATH support and fixed FlagSet typo
Signed-off-by: Dan Finneran <daniel.finneran@gmail.com>
2017-04-11 11:48:51 +01:00
Anil Madhavapeddy
eae5422a0d tweak moby run CLI help to reflect that it supports GCP as well
Signed-off-by: Anil Madhavapeddy <anil@docker.com>
2017-04-11 11:18:55 +01:00
Justin Cormack
5527a3b6a1 Merge pull request #1577 from riyazdf/errchecking
catch and handle errors in src/cmd/moby
2017-04-10 21:48:41 +01:00
Riyaz Faizullabhoy
37adb881f7 catch and handle errors in src/cmd/moby
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2017-04-10 13:36:46 -07:00
Riyaz Faizullabhoy
0aaeb92a44 qemu: catch error on disk create and exit with message
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2017-04-10 12:09:54 -07:00
Justin Cormack
d11a78982a Merge pull request #1571 from dave-tucker/panic
Fix panic in gcp code
2017-04-10 17:37:52 +01:00
Dave Tucker
7d519cb9b8 moby: use type assertion to avoid panic in gcp code
Signed-off-by: Dave Tucker <dt@docker.com>
2017-04-10 17:29:59 +01:00
Rolf Neugebauer
650d9011f4 cli: Adjust run_hyperkit to changed API
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-10 15:56:20 +01:00
Justin Cormack
66467544be Merge pull request #1521 from thebsdbox/qemu
CLI: Added qemu backend
2017-04-09 13:56:09 +01:00
thebsdbox
3446edbd0b CLI: Added qemu backend
Signed-off-by: Dan Finneran <daniel.finneran@gmail.com>
2017-04-09 13:49:00 +01:00
Riyaz Faizullabhoy
bd2211b645 trust: clean up logic for digests and orgs
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2017-04-08 17:25:18 -07:00
Justin Cormack
8176403426 system → onboot daemon → services
As suggested by @shykes these are clearer

- onboot for things that are run at boot time to completion
- services for persistent services

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-04-08 16:56:47 +01:00
Riyaz Faizullabhoy
68d8788e3b Enforce content trust with trust key and yaml subkeys for image and org
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2017-04-07 16:29:25 -07:00
Dave Tucker
799879d76d moby: Add -img-name flag to moby run gcp
This allows overriding the name used of the file in google storage,
image name or instance name. This will vary depending on how much `moby
run` is doing which is goverened by whether the positional argument
contains an `.img.tar.gz` or not.

For example:

`moby run gcp -img-name test-ea34d1 test` creates an instance called
`test-ea34d1` from the image `test`

`moby run gcp -img-name test-ea34d1` test.img.tar.gz` will upload the
file as `test-ea34d1.tar.gz`, create image `test-ea34d1` and create an
instance called `test-ea34d1`.

The use case for this is for CI to be able to spawn many concurrent test
machines and provide it's own name for them.

Signed-off-by: Dave Tucker <dt@docker.com>
2017-04-07 15:35:54 +01:00
Dave Tucker
0d8850d5d1 moby: Allow combination of env vars and flags for gcp
Signed-off-by: Dave Tucker <dt@docker.com>
2017-04-07 15:22:27 +01:00
Justin Cormack
7e1f2088d3 Make init accept a list of images not just a single one.
fix #1527

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-04-07 14:25:28 +01:00
Justin Cormack
be9ee95c4c Write the initrd incrementally
Slightly better for demo flow as no long pause at the end

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-04-07 11:37:40 +01:00
Rolf Neugebauer
2cce03f19e cli: Add option to the IP address for HyperKit VM
Note: This currently requires a custom version of VPNKit.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-07 10:52:40 +01:00
Justin Cormack
7a5cdfd90c Merge pull request #1530 from ijc25/create-directories-from-yaml
Support creating of directories in files section
2017-04-07 10:28:23 +01:00
Ian Campbell
a3ac69639b Support creating of directories in files section
e.g.
    files:
     - path: etc/docker/daemon.json
       contents: '{"debug": true}'
     - path: var/lib/mydaemon
       directory: true

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2017-04-07 09:55:18 +01:00
Justin Cormack
430f03b6a0 Merge pull request #1522 from dave-tucker/gce-gcp
Use GCP everywhere for consistency
2017-04-06 17:27:15 +01:00
Dave Tucker
78c49b247a moby: Add gcp platform to usage in moby run
Signed-off-by: Dave Tucker <dt@docker.com>
2017-04-06 17:10:04 +01:00
Dave Tucker
420661277a moby: Replace references to GCE with GCP
Signed-off-by: Dave Tucker <dt@docker.com>
2017-04-06 17:00:53 +01:00
Justin Cormack
57e2076031 Add more OCI features
- masked paths
- readonly paths
- allow attaching to existing namespaces, eg if bind mounted by a system container

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-04-06 15:05:08 +01:00
Justin Cormack
781b05da9d Merge pull request #1514 from rneugeba/cli-up
Improvements to the CLI
2017-04-06 13:01:58 +01:00
Rolf Neugebauer
048218f7c8 cli: Add a 'version' version
Pass version and git commit hash from the Makefile
into main.go. Add a 'version' subcommand to print
the information.

While at it also tweak the help output to only print the
command name and not the entire path.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-06 12:29:52 +01:00
Rolf Neugebauer
ae4b9ba897 cli: Fix "build" when the basename contains a "."
Something like "moby-4.10.yml" did not work when invoked
like "moby build moby-4.10".

While at it, also allow .yaml as an extension.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-06 10:55:18 +01:00
Justin Cormack
d0aff83a21 Add more OCI options
- Sysctl
- CgroupsPath
- RootfsPropagation

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-04-05 20:46:16 +01:00
Justin Cormack
1602277ba7 Merge pull request #1492 from dave-tucker/gcp
Add gcp backend for moby run
2017-04-05 15:17:01 +01:00
Justin Cormack
bc1dd84337 Merge pull request #1500 from justincormack/mount-overrides
Allow overriding the default mount options
2017-04-05 15:13:06 +01:00
Justin Cormack
c1c71a7f68 Allow overriding the default mount options
This refactors the mount handling, without changing any defaults.

Any specification of a mount destination will override the default,
so if you want to make `sysfs` read only you can add

```
mounts:
  - type: sysfs
    options: ["ro"]
```

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-04-05 15:00:13 +01:00
Dave Tucker
6521cd05f8 run: Add gcp backend
This commit implements `moby run gcp` which allows for testing of moby
images on the Google Cloud Platform

This backend attaches (via SSH) to the serial console.
It generates instance-only SSH keys and adds the public key to the
image metadata. These are used by the `moby` tool only.

It will also automatically upload a file and creates an image if the prefix
given to `moby run` is a filename

Signed-off-by: Dave Tucker <dt@docker.com>
2017-04-05 14:50:23 +01:00
Dave Tucker
af16e13672 build: Use older GCP API and support service account auth
This commit uses the older GCP API as it supports both compute and
storage. As a result, we can now use either Application Default
Credentials that are generated using the `gcloud` tool or by supplying the
service account credentials in JSON format

Signed-off-by: Dave Tucker <dt@docker.com>
2017-04-05 14:50:16 +01:00
Justin Cormack
8d22f19618 Fix typo that meant modules were missing from image
fix #1393 thanks @deitch

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-04-05 13:24:42 +01:00
Justin Cormack
a7bda72430 Merge pull request #1496 from justincormack/all-caps
Allow setting capabilities to "all"
2017-04-05 13:04:26 +01:00
Justin Cormack
8de5ab5d74 Add the standard options Docker sets for /proc
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-04-05 11:52:17 +01:00
Justin Cormack
475d29eae1 Allow setting capabilities to "all"
This adds every capability. We had this before the OCI changes as we
passed these values to Docker. Makes fully privileged containers less verbose.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-04-05 11:18:46 +01:00
Justin Cormack
ee2f8bc7e3 Split out OCI generation function
This is to make unit testing easier for #1481

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-04-04 11:28:30 +01:00
Justin Cormack
69b96d3aa7 Merge pull request #1479 from justincormack/command
Revert Command->Args but remove from yaml where not needed
2017-04-04 10:49:32 +01:00
Justin Cormack
bd87295e43 Revert Command->Args but remove from yaml where not needed
In the riddler change I changed "command" in the yaml to "args"
but did not change the files. In fact we basically used the
default command everywhere so this did not actually break.

Remove the unnecessary "command" lines to simplify yaml.

Revert the command to args change for now as I think I prefer
command, but its easier to switch now. Need to think if the
entrypoint/command distinction matters before finalizing.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-04-04 09:51:17 +01:00
Justin Cormack
b6b7eb08d2 Disable log driver for docker run
We are generally outputting to stdout pipe which the log driver does
not cope with very well; always did this in older builds.

Saves another 5% of build time.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-04-04 09:36:25 +01:00
Rolf Neugebauer
c6ba8ab4eb Merge pull request #1447 from thebsdbox/vmware
VMware backend support
2017-04-04 09:07:25 +01:00
Justin Cormack
d293eeadf6 Replace riddler with code that constructs config.json directly
Generated largely from the specified config; small parts taken from `docker image inspect`,
such as the command line.

Renamed some of the yaml keys to match the OCI spec rather than Docker Compose as
we decided they are more readable, no more underscores.

Add some extra functionality
- tmpfs specification
- fully general mount specification
- no new privileges can be specified now

For nostalgic reasons, using engine-api to talk to the docker cli as
we only need an old API version, and it is nice and easy to vendor...

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-04-03 23:28:55 +01:00
Ian Campbell
1477639e09 Update to runc ef9a4b315558d31eae520725ff67383c2f79c3cb
This is compatible with containerd 8353da59c6ae7e1933aac2228df23541ef8b163f
which was picked up by d2caae4c1a.

This required jiggering with riddler output some more to update to new OCI
config.json format for capabilities.

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2017-04-03 16:47:14 +01:00
thebsdbox
ab2ec26949 VMware Fusion 8.x / Workstation 12+ / VMware VIX vmrun support
Signed-off-by: Dan Finneran <daniel.finneran@gmail.com>
2017-04-03 14:19:13 +01:00
Rolf Neugebauer
156aab8b7d cli: Add support for passing meta data to a hyperkit VM
Add a -data option to the HyperKit "run" backend. This either
adds a string or a file to a ISO which is attached to the VM.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-02 19:35:45 +01:00
Rolf Neugebauer
2c91f6273f cli: Simplify run_hyperkit.go
Separating command line option parsing from executing hyperkit
makes the code awkward with many parameters passed between functions.

Having everything in one function makes the code simpler.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-02 19:33:25 +01:00
Rolf Neugebauer
681076f1a3 cli: Don't default to "moby" for run
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-02 19:33:25 +01:00
Rolf Neugebauer
397c4332f2 cli: Make the ".yml" extension optional for builds
This provides a consistent UX between build and run:
moby build foo   # build from foo.yml
moby run foo     # boot, e.g., foo-bzImage, foo-initrd.img

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-02 19:33:25 +01:00
Rolf Neugebauer
598dd31a7d cli: Don't default to moby.yml
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-02 19:33:25 +01:00
Rolf Neugebauer
5f9b98e8a7 cli: Use fixed mkimage-iso-efi image
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-01 16:25:02 +01:00
Rolf Neugebauer
35e1444cf2 cli: Add option to specify hyperkit to use
Some users seem to have Docker for Mac/hyperkit in a non-standard
path. Allow them to specify the path to the hyperkit executable.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-03-31 19:21:02 +01:00
Rolf Neugebauer
b64f74bd27 cli: Add support for multiple backends for "moby run"
- Move HyperKit code into a separate file. It should be compilable
  on all supported OSes now.
- Add a (optional) subcommand to "moby run" to select a backend
  i.e., "moby run hyperkit [options] [prefix]"
- On macOS the default is "hyperkit" so that:
  "moby run [options] [prefix]"
  just works
- Add enough command line parsing to make it easy to add new
  backends to the run command
Update help messages.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-03-30 18:59:07 +01:00
Rolf Neugebauer
cc77b36bba cli: Move "run" flag processing into the run implmentation
While at it also fix up the HyperKit run help message.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-03-30 16:00:06 +01:00
Rolf Neugebauer
df292ed56e cli: Move "build" flag processing into build.go
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-03-30 15:59:52 +01:00
Rolf Neugebauer
9297e70def moby: Create custom formatter for Info() log events
This formatter strips the prefix from Info() events to
make the default output of "moby build" more readable.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-03-29 13:43:27 +01:00
Rolf Neugebauer
71ee15c005 moby: Add informational output to build
This adds log.Info() to the main steps of the "moby build"
process. By default the Info() output is shown to the user
so it provides some idea of progress and what is happening.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-03-29 10:53:18 +01:00
Rolf Neugebauer
32b32ea78d moby: Add debug logging to "moby build" code
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-03-29 10:25:28 +01:00
Rolf Neugebauer
6814e21c0a moby: Add verbose and quiet flags to moby commandline
These set the log level to Debug and Error. The default
log level is set to Info.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-03-29 10:25:28 +01:00
Rolf Neugebauer
7c6eca2e8e moby: Switch to use logrus instead of default logger
logrus offers better control over log-levels.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-03-29 10:25:28 +01:00
Thomas Gazagnaire
0ab9624897 Fix typo in moby run
Signed-off-by: Thomas Gazagnaire <thomas@gazagnaire.org>
2017-03-28 11:08:28 +02:00
Rolf Neugebauer
9507f102cc Rename .yaml to .yml
docker-compose and other utilities use the .yml extension.
For consistency rename all .yaml to .yml

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-03-27 09:53:26 +02:00
Riyaz Faizullabhoy
594253b0a8 fmt string fixes
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2017-03-24 10:19:21 -07:00
Justin Cormack
af846e8014 Add a moby build --pull option to force pulling images
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-03-24 17:15:34 +00:00
Justin Cormack
630cafe592 Merge pull request #1378 from justincormack/riddler-files
Use Go code to extract rootfs from system containers
2017-03-24 13:36:51 +00:00
Justin Cormack
dd4ee77a23 Use Go code to extract rootfs from system containers
- this removes the use of riddler to extract the rootfs, use code
  we were using for rootfs. riddler now just geenrates the config,
  next stage is to generate this ourselves
- change the naming of the daemons so no longer include number as we
  do not guarantee ordering as they start up simultaneously

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-03-24 13:05:28 +00:00
Justin Cormack
c33896dcdc Merge pull request #1357 from thebsdbox/vmdk
added the capability to produce a vmdk file through Moby
2017-03-23 11:25:58 +00:00
dan
3fa494cb60 Added the capability to output moby images as vmdk files for use with VMware Workstation/Fusion
Corrected naming from vmware->vmdk and fixed Makfile

Fixed mistake outputting a vhd instead of a vmdk in output.go

Build vmdk image and added to Docker Hub, corrected link in output.go

Modified directories to confirm to standard mkimage-<imgType>

Signed-off-by: Dan Finneran <dan@thebsdbox.co.uk>
2017-03-23 11:16:40 +00:00
Justin Cormack
a2049a0da9 Merge pull request #1370 from justincormack/no-docker2tar
Remove docker2tar docker image, use Docker directly from Go
2017-03-23 09:44:21 +00:00
Justin Cormack
b63d27d405 Remove docker2tar docker image, use Docker directly from Go
Removing the left over indirect creates that use the Docker socket
and run in containers not directly.

See #1347

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-03-22 22:26:13 +00:00
Rolf Neugebauer
b8af990d62 moby: Log error when the kernel untar fails
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-03-22 15:14:17 +00:00
Rolf Neugebauer
d6e50e72d0 moby: Add a 'run' command to execute an image on hyperkit
'moby run' will use the kernel and initrd image produced
by 'moby build' and, on macOS, will run it inside a
hyperkit VM. This assumes that you have a recent version
of Docker for Mac installed as it re-uses the hyperkit
and VPNKit from it.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-03-22 14:47:56 +00:00
Rolf Neugebauer
7a6bc781de moby: Introduce the "build" subcommand
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-03-22 14:38:02 +00:00
Rolf Neugebauer
547a3e9380 moby: Factor out build code into a separate source file
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-03-22 14:38:02 +00:00
Justin Cormack
bede7847e3 Move Go code to src/cmd
This does not get everything where we want it finally, see #1266
nor the optimal way of building, but it gets it out of top level.

Added instructions to build if you have a Go installation.

Not moving `vendor` yet.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-03-21 14:37:23 +00:00
Justin Cormack
3c58702d42 Fix accidental removal of /etc/mtab from images
This was breaking some containers that use it, was a mistake.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-03-20 23:27:37 +00:00
Justin Cormack
4da9303b17 Output kernel command line to a file in the kernel+initrd output case
Trying to find the relevant yaml file was an issue as we now support
`--name` and it might be in a different directory, so although it is
a bit verbose outputing a whole file at least it is more consistent.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-03-20 13:43:09 +00:00
Justin Cormack
c4c7c1e8d8 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
ee76e8bdfd 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
7149da4b4f 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
a7d650f5be 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
Ian Campbell
728115f0ee 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
Justin Cormack
ee3379290b 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
Riyaz Faizullabhoy
450e39305b 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
Riyaz Faizullabhoy
e8d88ece91 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
Justin Cormack
7a58dad3a3 Fix typo/copy paste for IPC namespaces
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-03-13 15:00:22 +00:00
Justin Cormack
40ce7977ae Add qcow2 output support
- outputs compressed qcow2 image
- 1GB underlying size, may need changing

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-03-10 16:38:37 +00:00
Justin Cormack
64d388d3fe Add VHD and GCE output formats
- VHD is uncompressed VHD. Currently hard coded at 1GB, which may need to change. Use `format: vhd`
- GCE is the GCE compressed tarred raw image. Use `format: gce-img` - reserving `gce` for actually
  uploading the image.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-03-10 16:10:48 +00:00
Tycho Andersen
3fa9192f56 better debugging output in more error cases
Signed-off-by: Tycho Andersen <tycho@docker.com>
2017-03-09 14:29:40 -08:00
Tycho Andersen
183fb49d71 hoist kernel cmdline into moby.yaml
Signed-off-by: Tycho Andersen <tycho@docker.com>
2017-03-09 14:29:40 -08:00
Justin Cormack
befb0bcdec Add in sysctl container
- based on @riyazdf earlier unmerged Go version 891c006d34/alpine/containers/cloud-config/main.go

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-03-09 14:41:19 +00:00
Tycho Andersen
1cfe28aaa4 better debugging output in some error cases
from:

2017/03/07 09:59:30 Failed to extract kernel image and tarball

to

2017/03/07 10:06:04 Failed to extract kernel image and tarball: Unable to find image 'mobylinux/kernel:7fa748810d7866797fd807a5682d5cb3c9c98111' locally

Signed-off-by: Tycho Andersen <tycho@docker.com>
2017-03-07 10:50:12 -08:00
Justin Cormack
3637f0a5bd Out with the old, in with the new Moby
- remove remainder of editions code
- add a new check container to run tests without Docker
- switch over `make test` to use new command to build tests

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-03-06 22:28:41 +00:00
Justin Cormack
4cf1e1290d Add output types for BIOS and EFI ISOs
Note that the EFI ISO is not yet automatically sized, and the
kernel command lines are currently hard coded in the builders.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-03-03 18:44:47 -08:00
Justin Cormack
2c789d84d6 Add initial support for specifying the output type
Currently only supports kernel+initrd output but will add the rest
soon.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-03-03 14:49:47 -08:00
Justin Cormack
890097dc8e Refactoring of Moby tool
- split out config processing a bit
- just use `capabilities` not `cap-add` and `cap-drop`
- allow use of CAP_ prefix on capabilities, as this is what `runc` uses
- add nginx to example config
- fix bind mounts

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-03-01 15:52:51 -08:00
Justin Cormack
22298c7761 Rough first version of the moby tool
- terrible code
- lots needs changing
- can build a Moby from a config yaml that boots

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-02-20 21:44:23 +00:00
1249 changed files with 100726 additions and 24180 deletions

View File

@@ -3,7 +3,7 @@ jobs:
build:
working_directory: /go/src/github.com/linuxkit/linuxkit
docker:
- image: circleci/golang:1.9-stretch
- image: circleci/golang:1.10-stretch
steps:
- checkout
- run: mkdir -p ./bin

View File

@@ -21,6 +21,7 @@ Dave Tucker <dt@docker.com> <dave@dtucker.co.uk>
David Gageot <david.gageot@docker.com> <david@gageot.net>
David Sheets <david.sheets@docker.com> <dsheets@docker.com>
David Sheets <david.sheets@docker.com> <sheets@alum.mit.edu>
Eric Briand <eric.briand@gmail.com>
Ian Campbell <ian.campbell@docker.com> <ijc25@users.noreply.github.com>
Ian Campbell <ian.campbell@docker.com> <ijc@docker.com>
Ian Campbell <ian.campbell@docker.com> <ijc@users.noreply.github.com>
@@ -47,9 +48,10 @@ Radu Matei <matei.radu94@gmail.com>
Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com> <riyazdf@berkeley.edu>
Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com> <riyazdf@gmail.com>
Robin Winkelewski <w9ncontact@gmail.com>
Rolf Neugebauer <rolf.neugebauer@docker.com> <rneugeba@users.noreply.github.com>
Rolf Neugebauer <rolf.neugebauer@docker.com> <rn@users.noreply.github.com>
Rolf Neugebauer <rolf.neugebauer@docker.com> <rolf.neugebauer@gmail.com>
Rolf Neugebauer <rn@rneugeba.io> <rneugeba@users.noreply.github.com>
Rolf Neugebauer <rn@rneugeba.io> <rn@users.noreply.github.com>
Rolf Neugebauer <rn@rneugeba.io> <rolf.neugebauer@gmail.com>
Rolf Neugebauer <rn@rneugeba.io> <rolf.neugebauer@docker.com>
Sebastiaan van Stijn <sebastiaan.vanstijn@docker.com> <github@gone.nl>
Simon Ferquel <simon.ferquel@docker.com> <simon.ferquel@hotmail.fr>
Thomas Gazagnaire <thomas.gazagnaire@docker.com> <thomas@gazagnaire.com>

10
AUTHORS
View File

@@ -4,7 +4,9 @@
Ajeet Singh Raina, Docker Captain, {Code} Catalysts, Dell EMC R&D <ajeetraina@gmail.com>
Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Alan Raison <alanraison@users.noreply.github.com>
Alex Ellis <alexellis2@gmail.com>
Alex Johnson <hello@alex-johnson.net>
Alexander Slesarev <alex.slesarev@nudatasecurity.com>
Alice Frosi <alice@linux.vnet.ibm.com>
Amir Chaudhry <amir.chaudhry@docker.com>
Anil Madhavapeddy <anil.madhavapeddy@docker.com>
@@ -12,6 +14,7 @@ Avi Deitcher <avi@deitcher.net>
Bill Kerr <bill@generalbill.com>
Brice Figureau <brice-puppet@daysofwonder.com>
Carlton-Semple <carlton.semple@ibm.com>
Chanwit Kaewkasi <chanwit@gmail.com>
Craig Ingram <cingram@heroku.com>
Damiano Donati <damiano.donati@gmail.com>
Dan Finneran <dan@thebsdbox.co.uk>
@@ -30,6 +33,7 @@ Dieter Reuter <dieter.reuter@me.com>
Edward Vielmetti <edward.vielmetti@gmail.com>
Emily Casey <ecasey@pivotal.io>
Eric Briand <eric.briand@gmail.com>
Evan Hazlett <ejhazlett@gmail.com>
French Ben <frenchben@docker.com>
functor <meehow@gmail.com>
Garth Bushell <garth.bushell@oracle.com>
@@ -41,6 +45,7 @@ Ian Campbell <ian.campbell@docker.com>
Ilya Dmitrichenko <errordeveloper@gmail.com>
Isaac Rodman <isaac@eyz.us>
Istvan Szukacs <l1x@users.noreply.github.com>
Ivan Markin <sw@nogoegst.net>
Jason A. Donenfeld <Jason@zx2c4.com>
Jeff Wu <jeff.wu.junfei@gmail.com>
Jeffrey Hogan <jeff.hogan1@gmail.com>
@@ -89,7 +94,7 @@ Richard Mortier <mort@cantab.net>
Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
Robb Kistler <robb.kistler@docker.com>
Robin Winkelewski <w9ncontact@gmail.com>
Rolf Neugebauer <rolf.neugebauer@docker.com>
Rolf Neugebauer <rn@rneugeba.io>
Roman Shaposhnik <rvs@zededa.com>
Rui Lopes <rgl@ruilopes.com>
Ryoga Saito <proelbtn@gmail.com>
@@ -97,6 +102,7 @@ Scott Coulton <scott.coulton@puppet.com>
Sebastiaan van Stijn <sebastiaan.vanstijn@docker.com>
Simon Ferquel <simon.ferquel@docker.com>
Sotiris Salloumis <sotiris.salloumis@gmail.com>
Steeve Morin <steeve.morin@gmail.com>
Stefan Bourlon <stefan.bourlon@ca.com>
Stephen J Day <stephen.day@docker.com>
Steve Hiehn <shiehn@pivotal.io>
@@ -109,7 +115,9 @@ Thomas Shaw <tomwillfixit@users.noreply.github.com>
Tiago Pires <tandrepires@gmail.com>
Tiejun Chen <tiejun.china@gmail.com>
Tim Potter <tpot@hpe.com>
Tobias Gesellchen <tobias@gesellix.de>
Tobias Klauser <tklauser@distanz.ch>
Tristan Slominski <tristan.slominski@gmail.com>
Tycho Andersen <tycho@docker.com>
Vincent Demeester <Vincent.Demeester@docker.com>
Zachery Hostens <zacheryph@gmail.com>

View File

@@ -3,12 +3,30 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
## [v0.6] - 2018-07-26
### Added
- `linuxkit build` now works with private repositories and registries.
- `linuxkit pkg build` can build packages with sources outside the package directory.
- New `kernel+iso` format for `linuxkit build`.
### Changed
- `containerd` updated to v1.1.2.
- WireGuard updated to 0.0.20180718.
- Fixed SSH key handling on GCP.
- Changed name of logfiles when memlogd/logwrite is used.
- `moby/tool` code merged back into `linuxkit/linuxkit`
- Smaller `mkimage-*` packages.
### Removed
## [v0.5] - 2018-07-10
### Added
- New logging support with log rotation.
- Scaleway provider.
- Support for v4.17.x kernels.
- Kernel source are not included in the kernel packages.
- Kernel source are now included in the kernel packages.
- Improved documentation about debugging LinuxKit.
### Changed

View File

@@ -195,5 +195,5 @@ on disputes for technical matters."
[people.rn]
Name = "Rolf Neugebauer"
Email = "rolf.neugebauer@docker.com"
Email = "rn@rneugeba.io"
GitHub = "rn"

View File

@@ -1,7 +1,7 @@
VERSION="v0.5"
VERSION="v0.6"
GIT_COMMIT=$(shell git rev-list -1 HEAD)
GO_COMPILE=linuxkit/go-compile:49a2e8f8672ca95ad0159eebcc631773503465c1
GO_COMPILE=linuxkit/go-compile:e1204ce9921c1d45362a374e06be7234d3bf1184
ifeq ($(OS),Windows_NT)
LINUXKIT?=bin/linuxkit.exe

View File

@@ -58,8 +58,6 @@ linuxkit build linuxkit.yml
to build the example configuration. You can also specify different output formats, eg `linuxkit build -format raw-bios linuxkit.yml` to
output a raw BIOS bootable disk image, or `linuxkit build -format iso-efi linuxkit.yml` to output an EFI bootable ISO image. See `linuxkit build -help` for more information.
Since `linuxkit build` is built around the [Moby tool](https://github.com/moby/tool) the input yml files are described in the [Moby tool documentation](https://github.com/moby/tool/blob/master/docs/yaml.md).
### Booting and Testing
You can use `linuxkit run <name>` or `linuxkit run <name>.<format>` to
@@ -117,7 +115,7 @@ To customise, copy or modify the [`linuxkit.yml`](linuxkit.yml) to your own `fil
generate its specified output. You can run the output with `linuxkit run file`.
The yaml file specifies a kernel and base init system, a set of containers that are built into the generated image and started at boot time. You can specify the type
of artifact to build with the `moby` tool eg `linuxkit build -format vhd linuxkit.yml`.
of artifact to build eg `linuxkit build -format vhd linuxkit.yml`.
If you want to build your own packages, see this [document](docs/packages.md).
@@ -131,7 +129,7 @@ The yaml format specifies the image to be built:
- `services` is the system services, which normally run for the whole time the system is up
- `files` are additional files to add to the image
For a more detailed overview of the options see [yaml documentation](https://github.com/moby/tool/blob/master/docs/yaml.md)
For a more detailed overview of the options see [yaml documentation](docs/yaml.md)
## Architecture and security

View File

@@ -30,15 +30,15 @@ YAML file (`minimal.yml`):
```
kernel:
image: linuxkit/kernel:4.9.91
image: linuxkit/kernel:4.9.115
cmdline: "console=tty0 console=ttyS0 console=ttyAMA0"
init:
- linuxkit/init:v0.5
- linuxkit/runc:v0.5
- linuxkit/containerd:v0.5
- linuxkit/init:v0.6
- linuxkit/runc:v0.6
- linuxkit/containerd:v0.6
services:
- name: getty
image: linuxkit/getty:v0.5
image: linuxkit/getty:v0.6
env:
- INSECURE=true
trust:

View File

@@ -37,6 +37,7 @@ A package source consists of a directory containing at least two files:
- `image` _(string)_: *(mandatory)* The name of the image to build
- `org` _(string)_: The hub/registry organisation to which this package belongs
- `arches` _(list of string)_: The architectures which this package should be built for (valid entries are `GOARCH` names)
- `extra-sources` _(list of strings)_: Additional sources for the package outside the package directory. The format is `src:dst`, where `src` can be relative to the package directory and `dst` is the destination in the build context. This is useful for sharing files, such as vendored go code, between packages.
- `gitrepo` _(string)_: The git repository where the package source is kept.
- `network` _(bool)_: Allow network access during the package build (default: no)
- `disable-content-trust` _(bool)_: Disable Docker content trust for this package (default: no)

View File

@@ -113,7 +113,7 @@ cd $LK_ROOT/tools
../scripts/update-component-sha.sh --image linuxkit/alpine:$LK_ALPINE
git checkout alpine/versions.aarch64 alpine/versions.s390x
git commit -a -s -m "tools: Update to latest alpine base"
git commit -a -s -m "tools: Update to the latest linuxkit/alpine"
git push $LK_REMOTE rel_$LK_RELEASE
make forcepush
@@ -151,7 +151,7 @@ Next, we update the test packages to the updated alpine base on the `x86_64` sys
cd $LK_ROOT/test/pkg
../../scripts/update-component-sha.sh --image linuxkit/alpine:$LK_ALPINE
git commit -a -s -m "tests: Update packages to latest alpine base"
git commit -a -s -m "tests: Update packages to the latest linuxkit/alpine"
git push $LK_REMOTE rel_$LK_RELEASE
make push
@@ -176,6 +176,15 @@ done
git commit -a -s -m "Update use of test packages to latest"
```
Some tests also use `linuxkit/alpine`. Update them as well:
```sh
cd $LK_ROOT/test/cases
../../scripts/update-component-sha.sh --image linuxkit/alpine:$LK_ALPINE
git commit -a -s -m "tests: Update tests cases to the latest linuxkit/alpine"
```
### Update packages
Next, we update the LinuxKit packages. This is really the core of the
@@ -187,7 +196,7 @@ across packages.
cd $LK_ROOT/pkg
../scripts/update-component-sha.sh --image linuxkit/alpine:$LK_ALPINE
git commit -a -s -m "pkgs: Update packages to latest alpine base"
git commit -a -s -m "pkgs: Update packages to the latest linuxkit/alpine"
git push $LK_REMOTE rel_$LK_RELEASE
```
@@ -232,6 +241,7 @@ git commit -a -s -m "Update package tags to $LK_RELEASE"
### Final preparation steps
- Update AUTHORS by running `./scripts/generate-authors.sh`
- Update the `VERSION` variable in the top-level `Makefile`
- Create an entry in `CHANGELOG.md`. Take a look at `git log v0.3..HEAD` and pick interesting updates (of course adjust `v0.3` to the previous version).
- Create a PR with your changes.

View File

@@ -13,12 +13,6 @@ Details of usage of the `vndr` tool and the format of `vendor.conf` can be found
Once done, you must run the `vndr` tool to add the necessary files to the `vendor` directory.
The easiest way to do this is in a container.
Currently if updating `github.com/moby/tool` it is also necessary to
update `src/cmd/linuxkit/build.go` manually after updating `vendor.conf`:
hash=$(awk '/^github.com\/moby\/tool/ { print $2 }' src/cmd/linuxkit/vendor.conf)
curl -fsSL -o src/cmd/linuxkit/build.go https://raw.githubusercontent.com/moby/tool/${hash}/cmd/moby/build.go
## Updating in a container
To update all dependencies:
@@ -28,7 +22,7 @@ docker run -it --rm \
-v $(pwd):/go/src/github.com/linuxkit/linuxkit \
-w /go/src/github.com/linuxkit/linuxkit/src/cmd/linuxkit \
--entrypoint /go/bin/vndr \
linuxkit/go-compile:49a2e8f8672ca95ad0159eebcc631773503465c1
linuxkit/go-compile:e1204ce9921c1d45362a374e06be7234d3bf1184
```
To update a single dependency:
@@ -38,7 +32,7 @@ docker run -it --rm \
-v $(pwd):/go/src/github.com/linuxkit/linuxkit \
-w /go/src/github.com/linuxkit/linuxkit/src/cmd/linuxkit \
--entrypoint /go/bin/vndr \
linuxkit/go-compile:49a2e8f8672ca95ad0159eebcc631773503465c1
linuxkit/go-compile:e1204ce9921c1d45362a374e06be7234d3bf1184
github.com/docker/docker
```

278
docs/yaml.md Normal file
View File

@@ -0,0 +1,278 @@
# Configuration Reference
The `linuxkit build` command assembles a set of containerised components into in image. The simplest
type of image is just a `tar` file of the contents (useful for debugging) but more useful
outputs add a `Dockerfile` to build a container, or build a full disk image that can be
booted as a linuxKit VM. The main use case is to build an assembly that includes
`containerd` to run a set of containers, but the tooling is very generic.
The yaml configuration specifies the components used to build up an image . All components
are downloaded at build time to create an image. The image is self-contained and immutable,
so it can be tested reliably for continuous delivery.
Components are specified as Docker images which are pulled from a registry during build if they
are not available locally. The Docker images are optionally verified with Docker Content Trust.
For private registries or private repositories on a registry credentials provided via
`docker login` are re-used.
The configuration file is processed in the order `kernel`, `init`, `onboot`, `onshutdown`,
`services`, `files`. Each section adds files to the root file system. Sections may be omitted.
Each container that is specified is allocated a unique `uid` and `gid` that it may use if it
wishes to run as an isolated user (or user namespace). Anywhere you specify a `uid` or `gid`
field you specify either the numeric id, or if you use a name it will refer to the id allocated
to the container with that name.
```
services:
- name: redis
image: redis:latest
uid: redis
gid: redis
binds:
- /etc/redis:/etc/redis
files:
- path: /etc/redis/redis.conf
contents: "..."
uid: redis
gid: redis
mode: "0600"
```
## `kernel`
The `kernel` section is only required if booting a VM. The files will be put into the `boot/`
directory, where they are used to build bootable images.
The `kernel` section defines the kernel configuration. The `image` field specifies the Docker image,
which should contain a `kernel` file that will be booted (eg a `bzImage` for `amd64`) and a file
called `kernel.tar` which is a tarball that is unpacked into the root, which should usually
contain a kernel modules directory. `cmdline` specifies the kernel command line options if required.
To override the names, you can specify the kernel image name with `binary: bzImage` and the tar image
with `tar: kernel.tar` or the empty string or `none` if you do not want to use a tarball at all.
Kernel packages may also contain a cpio archive containing CPU microcode which needs prepending to
the initrd. To select this option, recommended when booting on bare metal, add `ucode: intel-ucode.cpio`
to the kernel section.
## `init`
The `init` section is a list of images that are used for the `init` system and are unpacked directly
into the root filesystem. This should bring up `containerd`, start the system and daemon containers,
and set up basic filesystem mounts. in the case of a LinuxKit system. For ease of
modification `runc` and `containerd` images, which just contain these programs are added here
rather than bundled into the `init` container.
## `onboot`
The `onboot` section is a list of images. These images are run before any other
images. They are run sequentially and each must exit before the next one is run.
These images can be used to configure one shot settings. See [Image
specification](#image-specification) for a list of supported fields.
## `onshutdown`
This is a list of images to run on a clean shutdown. Note that you must not rely on these
being run at all, as machines may be be powered off or shut down without having time to run
these scripts. If you add anything here you should test both in the case where they are
run and when they are not. Most systems are likely to be "crash only" and not have any setup here,
but you can attempt to deregister cleanly from a network service here, rather than relying
on timeouts, for example.
## `services`
The `services` section is a list of images for long running services which are
run with `containerd`. Startup order is undefined, so containers should wait
on any resources, such as networking, that they need. See [Image
specification](#image-specification) for a list of supported fields.
## `files`
The files section can be used to add files inline in the config, or from an external file.
```
files:
- path: dir
directory: true
mode: "0777"
- path: dir/name1
source: "/some/path/on/local/filesystem"
mode: "0666"
- path: dir/name2
source: "/some/path/that/it/is/ok/to/omit"
optional: true
mode: "0666"
- path: dir/name3
contents: "orange"
mode: "0644"
uid: 100
gid: 100
```
Specifying the `mode` is optional, and will default to `0600`. Leading directories will be
created if not specified. You can use `~/path` in `source` to specify a path in the build
user's home directory.
In addition there is a `metadata` option that will generate the file. Currently the only value
supported here is `"yaml"` which will output the yaml used to generate the image into the specified
file:
```
- path: etc/linuxkit.yml
metadata: yaml
```
Because a `tmpfs` is mounted onto `/var`, `/run`, and `/tmp` by default, the `tmpfs` mounts will shadow anything specified in `files` section for those directories.
## `trust`
The `trust` section specifies which build components are to be cryptographically verified with
[Docker Content Trust](https://docs.docker.com/engine/security/trust/content_trust/) prior to pulling.
Trust is a central concern in any build system, and LinuxKit's is no exception: Docker Content Trust provides authenticity,
integrity, and freshness guarantees for the components it verifies. The LinuxKit maintainers are responsible for signing
`linuxkit` components, though collaborators can sign their own images with Docker Content Trust or [Notary](https://github.com/docker/notary).
- `image` lists which individual images to enforce pulling with Docker Content Trust.
The image name may include tag or digest, but the matching also succeeds if the base image name is the same.
- `org` lists which organizations for which Docker Content Trust is to be enforced across all images,
for example `linuxkit` is the org for `linuxkit/kernel`
## Image specification
Entries in the `onboot` and `services` sections specify an OCI image and
options. Default values may be specified using the `org.mobyproject.config` image label.
For more details see the [OCI specification](https://github.com/opencontainers/runtime-spec/blob/master/spec.md).
If the `org.mobylinux.config` label is set in the image, that specifies default values for these fields if they
are not set in the yaml file. You can override the label by setting the value, or setting it to be empty to remove
the specification for that value in the label.
If you need an OCI option that is not specified here please open an issue or pull request as the list is not yet
complete.
By default the containers will be run in the host `net`, `ipc` and `uts` namespaces, as that is the usual requirement;
in many ways they behave like pods in Kubernetes. Mount points must already exist, as must a file or directory being
bind mounted into a container.
- `name` a unique name for the program being executed, used as the `containerd` id.
- `image` the Docker image to use for the root filesystem. The default command, path and environment are
extracted from this so they need not be filled in.
- `capabilities` the Linux capabilities required, for example `CAP_SYS_ADMIN`. If there is a single
capability `all` then all capabilities are added.
- `ambient` the Linux ambient capabilities (capabilities passed to non root users) that are required.
- `mounts` is the full form for specifying a mount, which requires `type`, `source`, `destination`
and a list of `options`. If any fields are omitted, sensible defaults are used if possible, for example
if the `type` is `dev` it is assumed you want to mount at `/dev`. The default mounts and their options
can be replaced by specifying a mount with new options here at the same mount point.
- `binds` is a simpler interface to specify bind mounts, accepting a string like `/src:/dest:opt1,opt2`
similar to the `-v` option for bind mounts in Docker.
- `tmpfs` is a simpler interface to mount a `tmpfs`, like `--tmpfs` in Docker, taking `/dest:opt1,opt2`.
- `command` will override the command and entrypoint in the image with a new list of commands.
- `env` will override the environment in the image with a new environment list. Specify variables as `VAR=value`.
- `cwd` will set the working directory, defaults to `/`.
- `net` sets the network namespace, either to a path, or if `none` or `new` is specified it will use a new namespace.
- `ipc` sets the ipc namespace, either to a path, or if `new` is specified it will use a new namespace.
- `uts` sets the uts namespace, either to a path, or if `new` is specified it will use a new namespace.
- `pid` sets the pid namespace, either to a path, or if `host` is specified it will use the host namespace.
- `readonly` sets the root filesystem to read only, and changes the other default filesystems to read only.
- `maskedPaths` sets paths which should be hidden.
- `readonlyPaths` sets paths to read only.
- `uid` sets the user id of the process.
- `gid` sets the group id of the process.
- `additionalGids` sets a list of additional groups for the process.
- `noNewPrivileges` is `true` means no additional capabilities can be acquired and `suid` binaries do not work.
- `hostname` sets the hostname inside the image.
- `oomScoreAdj` changes the OOM score.
- `rootfsPropagation` sets the rootfs propagation, eg `shared`, `slave` or (default) `private`.
- `cgroupsPath` sets the path for cgroups.
- `resources` sets cgroup resource limits as per the OCI spec.
- `sysctl` sets a map of `sysctl` key value pairs that are set inside the container namespace.
- `rmlimits` sets a list of `rlimit` values in the form `name,soft,hard`, eg `nofile,100,200`. You can use `unlimited` as a value too.
- `annotations` sets a map of key value pairs as OCI metadata.
There are experimental `userns`, `uidMappings` and `gidMappings` options for user namespaces but these are not yet supported, and may have
permissions issues in use.
In addition to the parts of the specification above used to generate the OCI spec, there is a `runtime` section in the image specification
which specifies some actions to take place when the container is being started.
- `cgroups` takes a list of cgroups that will be created before the container is run.
- `mounts` takes a list of mount specifications (`source`, `destination`, `type`, `options`) and mounts them in the root namespace before the container is created. It will
try to make any missing destination directories.
- `mkdir` takes a list of directories to create at runtime, in the root mount namespace. These are created before the container is started, so they can be used to create
directories for bind mounts, for example in `/tmp` or `/run` which would otherwise be empty.
- `interface` defines a list of actions to perform on a network interface:
- `name` specifies the name of an interface. An existing interface with this name will be moved into the container's network namespace.
- `add` specifies a type of interface to be created in the containers namespace, with the specified name.
- `createInRoot` is a boolean which specifes that the interface being `add`ed should be created in the root namespace first, then moved. This is needed for `wireguard` interfaces.
- `peer` specifies the name of the other end when creating a `veth` interface. This end will remain in the root namespace, where it can be attached to a bridge. Specifying this implies `add: veth`.
- `bindNS` specifies a namespace type and a path where the namespace from the container being created will be bound. This allows a namespace to be set up in an `onboot` container, and then
using `net: path` for a `service` container to use that network namespace later.
- `namespace` overrides the LinuxKit default containerd namespace to put the container in; only applicable to services.
An example of using the `runtime` config to configure a network namespace with `wireguard` and then run `nginx` in that namespace is shown below:
```
onboot:
- name: dhcpcd
image: linuxkit/dhcpcd:<hash>
command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"]
- name: wg
image: linuxkit/ip:<hash>
net: new
binds:
- /etc/wireguard:/etc/wireguard
command: ["sh", "-c", "ip link set dev wg0 up; ip address add dev wg0 192.168.2.1 peer 192.168.2.2; wg setconf wg0 /etc/wireguard/wg0.conf; wg show wg0"]
runtime:
interfaces:
- name: wg0
add: wireguard
createInRoot: true
bindNS:
net: /run/netns/wg
services:
- name: nginx
image: nginx:alpine
net: /run/netns/wg
capabilities:
- CAP_NET_BIND_SERVICE
- CAP_CHOWN
- CAP_SETUID
- CAP_SETGID
- CAP_DAC_OVERRIDE
```
### Mount Options
When mounting filesystem paths into a container - whether as part of `onboot` or `services` - there are several options of which you need to be aware. Using them properly is necessary for your containers to function properly.
For most containers - e.g. nginx or even docker - these options are not needed. Simply doing the following will work fine:
```yml
binds:
- /var:/some/var/path
```
Please note that `binds` doesn't **add** the mount points, but **replaces** them.
You can examine the `Dockerfile` of the component (in particular, `binds` value of
`org.mobyproject.config` label) to get the list of the existing binds.
However, in some circumstances you will need additional options. These options are used primarily if you intend to make changes to mount points _from within your container_ that should be visible from outside the container, e.g., if you intend to mount an external disk from inside the container but have it be visible outside.
In order for new mounts from within a container to be propagated, you must set the following on the container:
1. `rootfsPropagation: shared`
2. The mount point into the container below which new mounts are to occur must be `rshared,rbind`. In practice, this is `/var` (or some subdir of `/var`), since that is the only true read-write area of the filesystem where you will mount things.
Thus, if you have a regular container that is only reading and writing, go ahead and do:
```yml
binds:
- /var:/some/var/path
```
On the other hand, if you have a container that will make new mounts that you wish to be visible outside the container, do:
```yml
binds:
- /var:/var:rshared,rbind
rootfsPropagation: shared
```

View File

@@ -1,24 +1,24 @@
kernel:
image: linuxkit/kernel:4.14.54
image: linuxkit/kernel:4.14.58
cmdline: "console=ttyS0"
init:
- linuxkit/init:v0.5
- linuxkit/runc:v0.5
- linuxkit/containerd:v0.5
- linuxkit/ca-certificates:v0.5
- linuxkit/init:v0.6
- linuxkit/runc:v0.6
- linuxkit/containerd:v0.6
- linuxkit/ca-certificates:v0.6
onboot:
- name: sysctl
image: linuxkit/sysctl:v0.5
image: linuxkit/sysctl:v0.6
- name: dhcpcd
image: linuxkit/dhcpcd:v0.5
image: linuxkit/dhcpcd:v0.6
command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"]
- name: metadata
image: linuxkit/metadata:v0.5
image: linuxkit/metadata:v0.6
services:
- name: rngd
image: linuxkit/rngd:v0.5
image: linuxkit/rngd:v0.6
- name: sshd
image: linuxkit/sshd:v0.5
image: linuxkit/sshd:v0.6
binds:
- /run/config/ssh/authorized_keys:/root/.ssh/authorized_keys
- name: nginx

View File

@@ -1,21 +1,21 @@
kernel:
image: linuxkit/kernel:4.14.54
image: linuxkit/kernel:4.14.58
cmdline: "console=ttyS0"
init:
- linuxkit/init:v0.5
- linuxkit/runc:v0.5
- linuxkit/containerd:v0.5
- linuxkit/ca-certificates:v0.5
- linuxkit/init:v0.6
- linuxkit/runc:v0.6
- linuxkit/containerd:v0.6
- linuxkit/ca-certificates:v0.6
onboot:
- name: sysctl
image: linuxkit/sysctl:v0.5
image: linuxkit/sysctl:v0.6
services:
- name: rngd
image: linuxkit/rngd:v0.5
image: linuxkit/rngd:v0.6
- name: dhcpcd
image: linuxkit/dhcpcd:v0.5
image: linuxkit/dhcpcd:v0.6
- name: sshd
image: linuxkit/sshd:v0.5
image: linuxkit/sshd:v0.6
files:
- path: root/.ssh/authorized_keys
source: ~/.ssh/id_rsa.pub

View File

@@ -1,34 +1,34 @@
kernel:
image: linuxkit/kernel:4.14.54
image: linuxkit/kernel:4.14.58
cmdline: "console=tty0 console=ttyS0 console=ttyAMA0 console=ttysclp0"
init:
- linuxkit/init:v0.5
- linuxkit/runc:v0.5
- linuxkit/containerd:v0.5
- linuxkit/ca-certificates:v0.5
- linuxkit/init:v0.6
- linuxkit/runc:v0.6
- linuxkit/containerd:v0.6
- linuxkit/ca-certificates:v0.6
onboot:
- name: sysctl
image: linuxkit/sysctl:v0.5
image: linuxkit/sysctl:v0.6
- name: dhcpcd
image: linuxkit/dhcpcd:v0.5
image: linuxkit/dhcpcd:v0.6
command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"]
- name: sysfs
image: linuxkit/sysfs:v0.5
image: linuxkit/sysfs:v0.6
- name: format
image: linuxkit/format:v0.5
image: linuxkit/format:v0.6
- name: mount
image: linuxkit/mount:v0.5
image: linuxkit/mount:v0.6
command: ["/usr/bin/mountie", "/var/lib/docker"]
services:
- name: getty
image: linuxkit/getty:v0.5
image: linuxkit/getty:v0.6
env:
- INSECURE=true
- name: rngd
image: linuxkit/rngd:v0.5
image: linuxkit/rngd:v0.6
- name: ntpd
image: linuxkit/openntpd:v0.5
image: linuxkit/openntpd:v0.6
- name: docker
image: docker:17.10.0-ce-dind
@@ -46,7 +46,7 @@ services:
- /etc/docker/daemon.json:/etc/docker/daemon.json
command: ["/usr/local/bin/docker-init", "/usr/local/bin/dockerd"]
- name: cadvisor
image: linuxkit/cadvisor:v0.5
image: linuxkit/cadvisor:v0.6
files:
- path: var/lib/docker
directory: true

View File

@@ -1,32 +1,32 @@
# This is an example for building the open source components of Docker for Mac
kernel:
image: linuxkit/kernel:4.14.54
image: linuxkit/kernel:4.14.58
cmdline: "console=ttyS0 page_poison=1"
init:
- linuxkit/vpnkit-expose-port:v0.5 # install vpnkit-expose-port and vpnkit-iptables-wrapper on host
- linuxkit/init:v0.5
- linuxkit/runc:v0.5
- linuxkit/containerd:v0.5
- linuxkit/ca-certificates:v0.5
- linuxkit/vpnkit-expose-port:v0.6 # install vpnkit-expose-port and vpnkit-iptables-wrapper on host
- linuxkit/init:v0.6
- linuxkit/runc:v0.6
- linuxkit/containerd:v0.6
- linuxkit/ca-certificates:v0.6
onboot:
# support metadata for optional config in /run/config
- name: metadata
image: linuxkit/metadata:v0.5
image: linuxkit/metadata:v0.6
- name: sysctl
image: linuxkit/sysctl:v0.5
image: linuxkit/sysctl:v0.6
- name: sysfs
image: linuxkit/sysfs:v0.5
image: linuxkit/sysfs:v0.6
- name: binfmt
image: linuxkit/binfmt:v0.5
image: linuxkit/binfmt:v0.6
# Format and mount the disk image in /var/lib/docker
- name: format
image: linuxkit/format:v0.5
image: linuxkit/format:v0.6
- name: mount
image: linuxkit/mount:v0.5
image: linuxkit/mount:v0.6
command: ["/usr/bin/mountie", "/var/lib"]
# make a swap file on the mounted disk
- name: swap
image: linuxkit/swap:v0.5
image: linuxkit/swap:v0.6
command: ["/swap.sh", "--path", "/var/lib/swap", "--size", "1024M"]
# mount-vpnkit mounts the 9p share used by vpnkit to coordinate port forwarding
- name: mount-vpnkit
@@ -44,41 +44,41 @@ onboot:
- /var:/host_var
command: ["sh", "-c", "mv -v /host_var/log /host_var/lib && ln -vs /var/lib/log /host_var/log"]
- name: dhcpcd
image: linuxkit/dhcpcd:v0.5
image: linuxkit/dhcpcd:v0.6
command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"]
services:
# Enable acpi to shutdown on power events
- name: acpid
image: linuxkit/acpid:v0.5
image: linuxkit/acpid:v0.6
# Enable getty for easier debugging
- name: getty
image: linuxkit/getty:v0.5
image: linuxkit/getty:v0.6
env:
- INSECURE=true
# Run ntpd to keep time synchronised in the VM
- name: ntpd
image: linuxkit/openntpd:v0.5
image: linuxkit/openntpd:v0.6
# VSOCK to unix domain socket forwarding. Forwards guest /var/run/docker.sock
# to a socket on the host.
- name: vsudd
image: linuxkit/vsudd:v0.5
image: linuxkit/vsudd:v0.6
binds:
- /var/run:/var/run
command: ["/vsudd", "-inport", "2376:unix:/var/run/docker.sock"]
# vpnkit-forwarder forwards network traffic to/from the host via VSOCK port 62373.
# It needs access to the vpnkit 9P coordination share
- name: vpnkit-forwarder
image: linuxkit/vpnkit-forwarder:v0.5
image: linuxkit/vpnkit-forwarder:v0.6
binds:
- /var/vpnkit:/port
net: host
command: ["/vpnkit-forwarder", "-vsockPort", "62373"]
# Monitor for image deletes and invoke a TRIM on the container filesystem
- name: trim-after-delete
image: linuxkit/trim-after-delete:v0.5
image: linuxkit/trim-after-delete:v0.6
# When the host resumes from sleep, force a clock resync
- name: host-timesync-daemon
image: linuxkit/host-timesync-daemon:v0.5
image: linuxkit/host-timesync-daemon:v0.6
# Run dockerd with the vpnkit userland proxy from the vpnkit-forwarder container.
# Bind mounts /var/run to allow vsudd to connect to docker.sock, /var/vpnkit
# for vpnkit coordination and /run/config/docker for the configuration file.

View File

@@ -1,34 +1,34 @@
kernel:
image: linuxkit/kernel:4.14.54
image: linuxkit/kernel:4.14.58
cmdline: "console=tty0 console=ttyS0 console=ttyAMA0 console=ttysclp0"
init:
- linuxkit/init:v0.5
- linuxkit/runc:v0.5
- linuxkit/containerd:v0.5
- linuxkit/ca-certificates:v0.5
- linuxkit/init:v0.6
- linuxkit/runc:v0.6
- linuxkit/containerd:v0.6
- linuxkit/ca-certificates:v0.6
onboot:
- name: sysctl
image: linuxkit/sysctl:v0.5
image: linuxkit/sysctl:v0.6
- name: sysfs
image: linuxkit/sysfs:v0.5
image: linuxkit/sysfs:v0.6
- name: format
image: linuxkit/format:v0.5
image: linuxkit/format:v0.6
- name: mount
image: linuxkit/mount:v0.5
image: linuxkit/mount:v0.6
command: ["/usr/bin/mountie", "/var/lib/docker"]
services:
- name: getty
image: linuxkit/getty:v0.5
image: linuxkit/getty:v0.6
env:
- INSECURE=true
- name: rngd
image: linuxkit/rngd:v0.5
image: linuxkit/rngd:v0.6
- name: dhcpcd
image: linuxkit/dhcpcd:v0.5
image: linuxkit/dhcpcd:v0.6
- name: ntpd
image: linuxkit/openntpd:v0.5
image: linuxkit/openntpd:v0.6
- name: docker
image: docker:18.05.0-ce-dind
image: docker:18.06.0-ce-dind
capabilities:
- all
net: host

View File

@@ -1,28 +1,28 @@
kernel:
image: linuxkit/kernel:4.14.54
image: linuxkit/kernel:4.14.58
cmdline: "console=ttyS0"
init:
- linuxkit/init:v0.5
- linuxkit/runc:v0.5
- linuxkit/containerd:v0.5
- linuxkit/ca-certificates:v0.5
- linuxkit/init:v0.6
- linuxkit/runc:v0.6
- linuxkit/containerd:v0.6
- linuxkit/ca-certificates:v0.6
onboot:
- name: sysctl
image: linuxkit/sysctl:v0.5
image: linuxkit/sysctl:v0.6
- name: dhcpcd
image: linuxkit/dhcpcd:v0.5
image: linuxkit/dhcpcd:v0.6
command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"]
- name: metadata
image: linuxkit/metadata:v0.5
image: linuxkit/metadata:v0.6
services:
- name: getty
image: linuxkit/getty:v0.5
image: linuxkit/getty:v0.6
env:
- INSECURE=true
- name: rngd
image: linuxkit/rngd:v0.5
image: linuxkit/rngd:v0.6
- name: sshd
image: linuxkit/sshd:v0.5
image: linuxkit/sshd:v0.6
binds:
- /run/config/ssh/authorized_keys:/root/.ssh/authorized_keys
- name: nginx

View File

@@ -1,25 +1,25 @@
kernel:
image: linuxkit/kernel:4.14.54
image: linuxkit/kernel:4.14.58
cmdline: "console=tty0 console=ttyS0 console=ttyAMA0 console=ttysclp0"
init:
- linuxkit/init:v0.5
- linuxkit/runc:v0.5
- linuxkit/containerd:v0.5
- linuxkit/ca-certificates:v0.5
- linuxkit/init:v0.6
- linuxkit/runc:v0.6
- linuxkit/containerd:v0.6
- linuxkit/ca-certificates:v0.6
onboot:
- name: sysctl
image: linuxkit/sysctl:v0.5
image: linuxkit/sysctl:v0.6
- name: dhcpcd
image: linuxkit/dhcpcd:v0.5
image: linuxkit/dhcpcd:v0.6
command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"]
services:
- name: getty
image: linuxkit/getty:v0.5
image: linuxkit/getty:v0.6
# to make insecure with passwordless root login, uncomment following lines
#env:
# - INSECURE=true
- name: rngd
image: linuxkit/rngd:v0.5
image: linuxkit/rngd:v0.6
files:
- path: etc/getty.shadow
# sample sets password for root to "abcdefgh" (without quotes)

View File

@@ -1,16 +1,16 @@
kernel:
image: linuxkit/kernel:4.14.54
image: linuxkit/kernel:4.14.58
cmdline: "console=tty0 console=ttyS0 console=ttyAMA0 console=ttysclp0"
init:
- linuxkit/init:v0.5
- linuxkit/runc:v0.5
- linuxkit/containerd:v0.5
- linuxkit/ca-certificates:v0.5
- linuxkit/init:v0.6
- linuxkit/runc:v0.6
- linuxkit/containerd:v0.6
- linuxkit/ca-certificates:v0.6
onboot:
- name: sysctl
image: linuxkit/sysctl:v0.5
image: linuxkit/sysctl:v0.6
- name: dhcpcd
image: linuxkit/dhcpcd:v0.5
image: linuxkit/dhcpcd:v0.6
command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"]
onshutdown:
- name: shutdown
@@ -18,7 +18,7 @@ onshutdown:
command: ["/bin/echo", "so long and thanks for all the fish"]
services:
- name: getty
image: linuxkit/getty:v0.5
image: linuxkit/getty:v0.6
env:
- INSECURE=true
runtime:
@@ -30,7 +30,7 @@ services:
destination: writeable-host-etc
options: ["rw", "lowerdir=/etc", "upperdir=/run/hostetc/upper", "workdir=/run/hostetc/work"]
- name: rngd
image: linuxkit/rngd:v0.5
image: linuxkit/rngd:v0.6
- name: nginx
image: nginx:1.13.8-alpine
capabilities:

View File

@@ -1,18 +1,18 @@
kernel:
image: linuxkit/kernel:4.14.54
image: linuxkit/kernel:4.14.58
cmdline: "console=tty0 console=ttyS0 console=ttyAMA0"
init:
- linuxkit/init:v0.5
- linuxkit/runc:v0.5
- linuxkit/containerd:v0.5
- linuxkit/ca-certificates:v0.5
- linuxkit/init:v0.6
- linuxkit/runc:v0.6
- linuxkit/containerd:v0.6
- linuxkit/ca-certificates:v0.6
onboot:
- name: dhcpcd
image: linuxkit/dhcpcd:v0.5
image: linuxkit/dhcpcd:v0.6
command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"]
services:
- name: getty
image: linuxkit/getty:v0.5
image: linuxkit/getty:v0.6
env:
- INSECURE=true
- name: influxdb

View File

@@ -1,33 +1,33 @@
# Simple example of using an external logging service
kernel:
image: linuxkit/kernel:4.14.54
image: linuxkit/kernel:4.14.58
cmdline: "console=tty0 console=ttyS0 console=ttyAMA0"
init:
- linuxkit/init:v0.5
- linuxkit/runc:v0.5
- linuxkit/containerd:v0.5
- linuxkit/ca-certificates:v0.5
- linuxkit/memlogd:v0.5
- linuxkit/init:v0.6
- linuxkit/runc:v0.6
- linuxkit/containerd:v0.6
- linuxkit/ca-certificates:v0.6
- linuxkit/memlogd:v0.6
onboot:
- name: sysctl
image: linuxkit/sysctl:v0.5
image: linuxkit/sysctl:v0.6
- name: dhcpcd
image: linuxkit/dhcpcd:v0.5
image: linuxkit/dhcpcd:v0.6
command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"]
services:
# Inside the getty type `/proc/1/root/usr/bin/logread -F` to follow the log
- name: getty
image: linuxkit/getty:v0.5
image: linuxkit/getty:v0.6
env:
- INSECURE=true
# A service which generates log messages for testing
- name: write-to-the-logs
image: alpine
image: alpine:3.8
command: ["/bin/sh", "-c", "while /bin/true; do echo hello $(date); sleep 1; done" ]
- name: write-and-rotate-logs
image: linuxkit/logwrite:v0.5
image: linuxkit/logwrite:v0.6
- name: kmsg
image: linuxkit/kmsg:v0.5
image: linuxkit/kmsg:v0.6
trust:
org:
- linuxkit

View File

@@ -1,17 +1,17 @@
kernel:
image: linuxkit/kernel:4.14.54
image: linuxkit/kernel:4.14.58
cmdline: "console=tty0 console=ttyS0 console=ttyAMA0"
init:
- linuxkit/init:v0.5
- linuxkit/runc:v0.5
- linuxkit/containerd:v0.5
- linuxkit/init:v0.6
- linuxkit/runc:v0.6
- linuxkit/containerd:v0.6
onboot:
- name: dhcpcd
image: linuxkit/dhcpcd:v0.5
image: linuxkit/dhcpcd:v0.6
command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"]
services:
- name: getty
image: linuxkit/getty:v0.5
image: linuxkit/getty:v0.6
env:
- INSECURE=true
trust:

View File

@@ -1,21 +1,21 @@
kernel:
image: linuxkit/kernel:4.14.54
image: linuxkit/kernel:4.14.58
cmdline: "console=tty0 console=ttyS0"
init:
- linuxkit/init:v0.5
- linuxkit/runc:v0.5
- linuxkit/containerd:v0.5
- linuxkit/init:v0.6
- linuxkit/runc:v0.6
- linuxkit/containerd:v0.6
services:
- name: getty
image: linuxkit/getty:v0.5
image: linuxkit/getty:v0.6
env:
- INSECURE=true
- name: rngd
image: linuxkit/rngd:v0.5
image: linuxkit/rngd:v0.6
- name: dhcpcd
image: linuxkit/dhcpcd:v0.5
image: linuxkit/dhcpcd:v0.6
- name: node_exporter
image: linuxkit/node_exporter:v0.5
image: linuxkit/node_exporter:v0.6
trust:
org:
- linuxkit

View File

@@ -1,25 +1,25 @@
kernel:
image: linuxkit/kernel:4.14.54
image: linuxkit/kernel:4.14.58
cmdline: "console=ttyS0"
init:
- linuxkit/init:v0.5
- linuxkit/runc:v0.5
- linuxkit/containerd:v0.5
- linuxkit/ca-certificates:v0.5
- linuxkit/init:v0.6
- linuxkit/runc:v0.6
- linuxkit/containerd:v0.6
- linuxkit/ca-certificates:v0.6
onboot:
- name: sysctl
image: linuxkit/sysctl:v0.5
image: linuxkit/sysctl:v0.6
- name: dhcpcd
image: linuxkit/dhcpcd:v0.5
image: linuxkit/dhcpcd:v0.6
command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"]
- name: metadata
image: linuxkit/metadata:v0.5
image: linuxkit/metadata:v0.6
command: ["/usr/bin/metadata", "openstack"]
services:
- name: rngd
image: linuxkit/rngd:v0.5
image: linuxkit/rngd:v0.6
- name: sshd
image: linuxkit/sshd:v0.5
image: linuxkit/sshd:v0.6
binds:
- /run/config/ssh/authorized_keys:/root/.ssh/authorized_keys
- name: nginx

View File

@@ -5,10 +5,10 @@
# for arm64 then the 'ucode' line in the kernel section can be left
# out.
kernel:
image: linuxkit/kernel:4.14.54
image: linuxkit/kernel:4.14.58
cmdline: "console=ttyAMA0"
ucode: ""
onboot:
- name: modprobe
image: linuxkit/modprobe:v0.5
image: linuxkit/modprobe:v0.6
command: ["modprobe", "nicvf"]

View File

@@ -1,34 +1,34 @@
kernel:
image: linuxkit/kernel:4.14.54
image: linuxkit/kernel:4.14.58
cmdline: console=ttyS1
ucode: intel-ucode.cpio
init:
- linuxkit/init:v0.5
- linuxkit/runc:v0.5
- linuxkit/containerd:v0.5
- linuxkit/ca-certificates:v0.5
- linuxkit/firmware:v0.5
- linuxkit/init:v0.6
- linuxkit/runc:v0.6
- linuxkit/containerd:v0.6
- linuxkit/ca-certificates:v0.6
- linuxkit/firmware:v0.6
onboot:
- name: rngd1
image: linuxkit/rngd:v0.5
image: linuxkit/rngd:v0.6
command: ["/sbin/rngd", "-1"]
- name: sysctl
image: linuxkit/sysctl:v0.5
image: linuxkit/sysctl:v0.6
- name: dhcpcd
image: linuxkit/dhcpcd:v0.5
image: linuxkit/dhcpcd:v0.6
command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"]
- name: metadata
image: linuxkit/metadata:v0.5
image: linuxkit/metadata:v0.6
command: ["/usr/bin/metadata", "packet"]
services:
- name: rngd
image: linuxkit/rngd:v0.5
image: linuxkit/rngd:v0.6
- name: getty
image: linuxkit/getty:v0.5
image: linuxkit/getty:v0.6
env:
- INSECURE=true
- name: sshd
image: linuxkit/sshd:v0.5
image: linuxkit/sshd:v0.6
files:
- path: root/.ssh/authorized_keys
source: ~/.ssh/id_rsa.pub

View File

@@ -1,19 +1,19 @@
# Minimal YAML to run a redis server (used at DockerCon'17)
# connect: nc localhost 6379
kernel:
image: linuxkit/kernel:4.14.54
image: linuxkit/kernel:4.14.58
cmdline: "console=tty0 console=ttyS0 console=ttyAMA0 console=ttysclp0"
init:
- linuxkit/init:v0.5
- linuxkit/runc:v0.5
- linuxkit/containerd:v0.5
- linuxkit/init:v0.6
- linuxkit/runc:v0.6
- linuxkit/containerd:v0.6
onboot:
- name: dhcpcd
image: linuxkit/dhcpcd:v0.5
image: linuxkit/dhcpcd:v0.6
command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"]
services:
- name: getty
image: linuxkit/getty:v0.5
image: linuxkit/getty:v0.6
env:
- INSECURE=true
# Currently redis:4.0.6-alpine has trust issue with multi-arch

View File

@@ -1,25 +1,25 @@
kernel:
image: linuxkit/kernel:4.14.54-rt
image: linuxkit/kernel:4.14.58-rt
cmdline: "console=tty0"
init:
- linuxkit/init:v0.5
- linuxkit/runc:v0.5
- linuxkit/containerd:v0.5
- linuxkit/ca-certificates:v0.5
- linuxkit/init:v0.6
- linuxkit/runc:v0.6
- linuxkit/containerd:v0.6
- linuxkit/ca-certificates:v0.6
onboot:
- name: sysctl
image: linuxkit/sysctl:v0.5
image: linuxkit/sysctl:v0.6
services:
- name: getty
image: linuxkit/getty:v0.5
image: linuxkit/getty:v0.6
env:
- INSECURE=true
- name: rngd
image: linuxkit/rngd:v0.5
image: linuxkit/rngd:v0.6
- name: dhcpcd
image: linuxkit/dhcpcd:v0.5
image: linuxkit/dhcpcd:v0.6
- name: open-vm-tools
image: linuxkit/open-vm-tools:v0.5
image: linuxkit/open-vm-tools:v0.6
- name: nginx
image: nginx:1.13.8-alpine
capabilities:

View File

@@ -1,29 +1,29 @@
kernel:
image: linuxkit/kernel:4.14.54
image: linuxkit/kernel:4.14.58
cmdline: "console=tty0 console=ttyS0 console=ttyAMA0 console=ttysclp0 root=/dev/vda"
init:
- linuxkit/init:v0.5
- linuxkit/runc:v0.5
- linuxkit/containerd:v0.5
- linuxkit/ca-certificates:v0.5
- linuxkit/init:v0.6
- linuxkit/runc:v0.6
- linuxkit/containerd:v0.6
- linuxkit/ca-certificates:v0.6
onboot:
- name: sysctl
image: linuxkit/sysctl:v0.5
image: linuxkit/sysctl:v0.6
- name: rngd1
image: linuxkit/rngd:v0.5
image: linuxkit/rngd:v0.6
command: ["/sbin/rngd", "-1"]
- name: dhcpcd
image: linuxkit/dhcpcd:v0.5
image: linuxkit/dhcpcd:v0.6
command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"]
- name: metadata
image: linuxkit/metadata:v0.5
image: linuxkit/metadata:v0.6
services:
- name: getty
image: linuxkit/getty:v0.5
image: linuxkit/getty:v0.6
env:
- INSECURE=true
- name: rngd
image: linuxkit/rngd:v0.5
image: linuxkit/rngd:v0.6
trust:
org:
- linuxkit

View File

@@ -1,28 +1,28 @@
kernel:
image: linuxkit/kernel:4.14.54
image: linuxkit/kernel:4.14.58
cmdline: "console=tty0 console=ttyS0 console=ttyAMA0 console=ttysclp0"
init:
- linuxkit/init:v0.5
- linuxkit/runc:v0.5
- linuxkit/containerd:v0.5
- linuxkit/ca-certificates:v0.5
- linuxkit/init:v0.6
- linuxkit/runc:v0.6
- linuxkit/containerd:v0.6
- linuxkit/ca-certificates:v0.6
onboot:
- name: sysctl
image: linuxkit/sysctl:v0.5
image: linuxkit/sysctl:v0.6
- name: rngd1
image: linuxkit/rngd:v0.5
image: linuxkit/rngd:v0.6
command: ["/sbin/rngd", "-1"]
services:
- name: getty
image: linuxkit/getty:v0.5
image: linuxkit/getty:v0.6
env:
- INSECURE=true
- name: rngd
image: linuxkit/rngd:v0.5
image: linuxkit/rngd:v0.6
- name: dhcpcd
image: linuxkit/dhcpcd:v0.5
image: linuxkit/dhcpcd:v0.6
- name: sshd
image: linuxkit/sshd:v0.5
image: linuxkit/sshd:v0.6
files:
- path: root/.ssh/authorized_keys
source: ~/.ssh/id_rsa.pub

View File

@@ -1,34 +1,34 @@
kernel:
image: linuxkit/kernel:4.14.54
image: linuxkit/kernel:4.14.58
cmdline: "console=tty0 console=ttyS0 console=ttyAMA0 console=ttysclp0"
init:
- linuxkit/init:v0.5
- linuxkit/runc:v0.5
- linuxkit/containerd:v0.5
- linuxkit/ca-certificates:v0.5
- linuxkit/init:v0.6
- linuxkit/runc:v0.6
- linuxkit/containerd:v0.6
- linuxkit/ca-certificates:v0.6
onboot:
- name: sysctl
image: linuxkit/sysctl:v0.5
image: linuxkit/sysctl:v0.6
- name: dhcpcd
image: linuxkit/dhcpcd:v0.5
image: linuxkit/dhcpcd:v0.6
command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"]
- name: format
image: linuxkit/format:v0.5
image: linuxkit/format:v0.6
- name: mount
image: linuxkit/mount:v0.5
image: linuxkit/mount:v0.6
command: ["/usr/bin/mountie", "/var/external"]
- name: swap
image: linuxkit/swap:v0.5
image: linuxkit/swap:v0.6
# to use unencrypted swap, use:
# command: ["/swap.sh", "--path", "/var/external/swap", "--size", "1G"]
command: ["/swap.sh", "--path", "/var/external/swap", "--size", "1G", "--encrypt"]
services:
- name: getty
image: linuxkit/getty:v0.5
image: linuxkit/getty:v0.6
env:
- INSECURE=true
- name: rngd
image: linuxkit/rngd:v0.5
image: linuxkit/rngd:v0.6
trust:
org:
- linuxkit

View File

@@ -2,25 +2,25 @@ kernel:
image: linuxkit/kernel:4.9.38
cmdline: "console=tty0 console=ttyS0"
init:
- linuxkit/init:v0.5
- linuxkit/runc:v0.5
- linuxkit/containerd:v0.5
- linuxkit/ca-certificates:v0.5
- linuxkit/init:v0.6
- linuxkit/runc:v0.6
- linuxkit/containerd:v0.6
- linuxkit/ca-certificates:v0.6
onboot:
- name: sysctl
image: linuxkit/sysctl:v0.5
image: linuxkit/sysctl:v0.6
- name: dhcpcd
image: linuxkit/dhcpcd:v0.5
image: linuxkit/dhcpcd:v0.6
command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"]
services:
- name: getty
image: linuxkit/getty:v0.5
image: linuxkit/getty:v0.6
env:
- INSECURE=true
- name: tss
image: linuxkit/tss:v0.5
image: linuxkit/tss:v0.6
- name: rngd
image: linuxkit/rngd:v0.5
image: linuxkit/rngd:v0.6
files:
- path: etc/getty.shadow
# sample sets password for root to "abcdefgh" (without quotes)

View File

@@ -1,23 +1,23 @@
kernel:
image: linuxkit/kernel:4.14.54
image: linuxkit/kernel:4.14.58
cmdline: "console=tty0"
init:
- linuxkit/init:v0.5
- linuxkit/runc:v0.5
- linuxkit/containerd:v0.5
- linuxkit/ca-certificates:v0.5
- linuxkit/init:v0.6
- linuxkit/runc:v0.6
- linuxkit/containerd:v0.6
- linuxkit/ca-certificates:v0.6
onboot:
- name: sysctl
image: linuxkit/sysctl:v0.5
image: linuxkit/sysctl:v0.6
services:
- name: getty
image: linuxkit/getty:v0.5
image: linuxkit/getty:v0.6
env:
- INSECURE=true
- name: rngd
image: linuxkit/rngd:v0.5
image: linuxkit/rngd:v0.6
- name: dhcpcd
image: linuxkit/dhcpcd:v0.5
image: linuxkit/dhcpcd:v0.6
- name: nginx
image: nginx:1.13.8-alpine
capabilities:

View File

@@ -1,13 +1,13 @@
kernel:
image: linuxkit/kernel:4.14.54
image: linuxkit/kernel:4.14.58
cmdline: "console=ttyS0"
init:
- linuxkit/init:v0.5
- linuxkit/runc:v0.5
- linuxkit/containerd:v0.5
- linuxkit/init:v0.6
- linuxkit/runc:v0.6
- linuxkit/containerd:v0.6
onboot:
- name: dhcpcd
image: linuxkit/dhcpcd:v0.5
image: linuxkit/dhcpcd:v0.6
command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"]
- name: mount-vpnkit
image: alpine:3.8
@@ -19,9 +19,9 @@ onboot:
command: ["sh", "-c", "mkdir /host_var/vpnkit && mount -v -t 9p -o trans=virtio,dfltuid=1001,dfltgid=50,version=9p2000 port /host_var/vpnkit"]
services:
- name: sshd
image: linuxkit/sshd:v0.5
image: linuxkit/sshd:v0.6
- name: vpnkit-forwarder
image: linuxkit/vpnkit-forwarder:v0.5
image: linuxkit/vpnkit-forwarder:v0.6
binds:
- /var/vpnkit:/port
net: host

View File

@@ -1,17 +1,17 @@
kernel:
image: linuxkit/kernel:4.14.54
image: linuxkit/kernel:4.14.58
cmdline: "console=ttyS0"
init:
- linuxkit/init:v0.5
- linuxkit/runc:v0.5
- linuxkit/containerd:v0.5
- linuxkit/init:v0.6
- linuxkit/runc:v0.6
- linuxkit/containerd:v0.6
onboot:
- name: dhcpcd
image: linuxkit/dhcpcd:v0.5
image: linuxkit/dhcpcd:v0.6
command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"]
services:
- name: vsudd
image: linuxkit/vsudd:v0.5
image: linuxkit/vsudd:v0.6
binds:
- /run/containerd/containerd.sock:/run/containerd/containerd.sock
command: ["/vsudd",

View File

@@ -1,28 +1,28 @@
kernel:
image: linuxkit/kernel:4.14.54
image: linuxkit/kernel:4.14.58
cmdline: "console=ttyS0"
init:
- linuxkit/init:v0.5
- linuxkit/runc:v0.5
- linuxkit/containerd:v0.5
- linuxkit/ca-certificates:v0.5
- linuxkit/init:v0.6
- linuxkit/runc:v0.6
- linuxkit/containerd:v0.6
- linuxkit/ca-certificates:v0.6
onboot:
- name: sysctl
image: linuxkit/sysctl:v0.5
image: linuxkit/sysctl:v0.6
- name: dhcpcd
image: linuxkit/dhcpcd:v0.5
image: linuxkit/dhcpcd:v0.6
command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"]
- name: metadata
image: linuxkit/metadata:v0.5
image: linuxkit/metadata:v0.6
services:
- name: getty
image: linuxkit/getty:v0.5
image: linuxkit/getty:v0.6
env:
- INSECURE=true
- name: rngd
image: linuxkit/rngd:v0.5
image: linuxkit/rngd:v0.6
- name: sshd
image: linuxkit/sshd:v0.5
image: linuxkit/sshd:v0.6
binds:
- /run/config/ssh/authorized_keys:/root/.ssh/authorized_keys
- name: nginx

View File

@@ -1,19 +1,19 @@
kernel:
image: linuxkit/kernel:4.14.54
image: linuxkit/kernel:4.14.58
cmdline: "console=tty0 console=ttyS0 console=ttyAMA0"
init:
- linuxkit/init:v0.5
- linuxkit/runc:v0.5
- linuxkit/containerd:v0.5
- linuxkit/ca-certificates:v0.5
- linuxkit/init:v0.6
- linuxkit/runc:v0.6
- linuxkit/containerd:v0.6
- linuxkit/ca-certificates:v0.6
onboot:
- name: sysctl
image: linuxkit/sysctl:v0.5
image: linuxkit/sysctl:v0.6
- name: dhcpcd
image: linuxkit/dhcpcd:v0.5
image: linuxkit/dhcpcd:v0.6
command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"]
- name: wg0
image: linuxkit/ip:v0.5
image: linuxkit/ip:v0.6
net: new
binds:
- /etc/wireguard:/etc/wireguard
@@ -26,7 +26,7 @@ onboot:
bindNS:
net: /run/netns/wg0
- name: wg1
image: linuxkit/ip:v0.5
image: linuxkit/ip:v0.6
net: new
binds:
- /etc/wireguard:/etc/wireguard
@@ -40,12 +40,12 @@ onboot:
net: /run/netns/wg1
services:
- name: getty
image: linuxkit/getty:v0.5
image: linuxkit/getty:v0.6
env:
- INSECURE=true
net: /run/netns/wg1
- name: rngd
image: linuxkit/rngd:v0.5
image: linuxkit/rngd:v0.6
- name: nginx
image: nginx:1.13.8-alpine
net: /run/netns/wg0

View File

@@ -42,8 +42,8 @@ ENV KERNEL_SOURCE=https://www.kernel.org/pub/linux/kernel/v4.x/linux-${KERNEL_VE
ENV KERNEL_SHA256_SUMS=https://www.kernel.org/pub/linux/kernel/v4.x/sha256sums.asc
ENV KERNEL_PGP2_SIGN=https://www.kernel.org/pub/linux/kernel/v4.x/linux-${KERNEL_VERSION}.tar.sign
ENV WIREGUARD_VERSION=0.0.20180708
ENV WIREGUARD_SHA256="5e38d554f7d1e3a64e3a5319ca1a3b790c84ed89c896586c490a93ac1f953a91"
ENV WIREGUARD_VERSION=0.0.20180718
ENV WIREGUARD_SHA256="083c093a6948c8d38f92e7ea5533f9ff926019f24dc2612ea974851ed3e24705"
ENV WIREGUARD_URL=https://git.zx2c4.com/WireGuard/snapshot/WireGuard-${WIREGUARD_VERSION}.tar.xz
# We copy the entire directory. This copies some unneeded files, but

View File

@@ -218,21 +218,21 @@ endef
# Debug targets only for latest stable and LTS stable
#
ifeq ($(ARCH),x86_64)
$(eval $(call kernel,4.17.5,4.17.x,$(EXTRA),$(DEBUG)))
$(eval $(call kernel,4.14.54,4.14.x,$(EXTRA),$(DEBUG)))
$(eval $(call kernel,4.14.54,4.14.x,,-dbg))
$(eval $(call kernel,4.17.10,4.17.x,$(EXTRA),$(DEBUG)))
$(eval $(call kernel,4.14.58,4.14.x,$(EXTRA),$(DEBUG)))
$(eval $(call kernel,4.14.58,4.14.x,,-dbg))
$(eval $(call kernel,4.14.53,4.14.x,-rt,))
$(eval $(call kernel,4.9.111,4.9.x,$(EXTRA),$(DEBUG)))
$(eval $(call kernel,4.4.139,4.4.x,$(EXTRA),$(DEBUG)))
$(eval $(call kernel,4.9.115,4.9.x,$(EXTRA),$(DEBUG)))
$(eval $(call kernel,4.4.144,4.4.x,$(EXTRA),$(DEBUG)))
else ifeq ($(ARCH),aarch64)
$(eval $(call kernel,4.17.5,4.17.x,$(EXTRA),$(DEBUG)))
$(eval $(call kernel,4.14.54,4.14.x,$(EXTRA),$(DEBUG)))
$(eval $(call kernel,4.17.10,4.17.x,$(EXTRA),$(DEBUG)))
$(eval $(call kernel,4.14.58,4.14.x,$(EXTRA),$(DEBUG)))
$(eval $(call kernel,4.14.53,4.14.x,-rt,))
else ifeq ($(ARCH),s390x)
$(eval $(call kernel,4.17.5,4.17.x,$(EXTRA),$(DEBUG)))
$(eval $(call kernel,4.14.54,4.14.x,$(EXTRA),$(DEBUG)))
$(eval $(call kernel,4.17.10,4.17.x,$(EXTRA),$(DEBUG)))
$(eval $(call kernel,4.14.58,4.14.x,$(EXTRA),$(DEBUG)))
endif
# Target for kernel config

View File

@@ -1,6 +1,6 @@
#
# Automatically generated file; DO NOT EDIT.
# Linux/arm64 4.14.54 Kernel Configuration
# Linux/arm64 4.14.58 Kernel Configuration
#
CONFIG_ARM64=y
CONFIG_64BIT=y
@@ -574,6 +574,7 @@ CONFIG_XEN=y
CONFIG_FORCE_MAX_ZONEORDER=11
CONFIG_UNMAP_KERNEL_AT_EL0=y
CONFIG_HARDEN_BRANCH_PREDICTOR=y
CONFIG_ARM64_SSBD=y
# CONFIG_ARM64_SW_TTBR0_PAN is not set
#

View File

@@ -1,6 +1,6 @@
#
# Automatically generated file; DO NOT EDIT.
# Linux/s390 4.14.54 Kernel Configuration
# Linux/s390 4.14.58 Kernel Configuration
#
CONFIG_MMU=y
CONFIG_ZONE_DMA=y

View File

@@ -1,6 +1,6 @@
#
# Automatically generated file; DO NOT EDIT.
# Linux/x86 4.14.54 Kernel Configuration
# Linux/x86 4.14.58 Kernel Configuration
#
CONFIG_64BIT=y
CONFIG_X86_64=y
@@ -4056,7 +4056,6 @@ CONFIG_CRYPTO_DES3_EDE_X86_64=y
CONFIG_CRYPTO_FCRYPT=y
CONFIG_CRYPTO_KHAZAD=y
CONFIG_CRYPTO_SALSA20=y
CONFIG_CRYPTO_SALSA20_X86_64=y
CONFIG_CRYPTO_CHACHA20=y
CONFIG_CRYPTO_CHACHA20_X86_64=y
CONFIG_CRYPTO_SEED=y

View File

@@ -1,6 +1,6 @@
#
# Automatically generated file; DO NOT EDIT.
# Linux/arm64 4.17.5 Kernel Configuration
# Linux/arm64 4.17.10 Kernel Configuration
#
CONFIG_ARM64=y
CONFIG_64BIT=y
@@ -580,6 +580,7 @@ CONFIG_FORCE_MAX_ZONEORDER=11
CONFIG_UNMAP_KERNEL_AT_EL0=y
CONFIG_HARDEN_BRANCH_PREDICTOR=y
CONFIG_HARDEN_EL2_VECTORS=y
CONFIG_ARM64_SSBD=y
# CONFIG_ARM64_SW_TTBR0_PAN is not set
#

View File

@@ -1,6 +1,6 @@
#
# Automatically generated file; DO NOT EDIT.
# Linux/s390 4.17.5 Kernel Configuration
# Linux/s390 4.17.10 Kernel Configuration
#
CONFIG_MMU=y
CONFIG_ZONE_DMA=y

View File

@@ -1,6 +1,6 @@
#
# Automatically generated file; DO NOT EDIT.
# Linux/x86 4.17.5 Kernel Configuration
# Linux/x86 4.17.10 Kernel Configuration
#
CONFIG_64BIT=y
CONFIG_X86_64=y
@@ -4049,7 +4049,6 @@ CONFIG_CRYPTO_DES3_EDE_X86_64=y
CONFIG_CRYPTO_FCRYPT=y
CONFIG_CRYPTO_KHAZAD=y
CONFIG_CRYPTO_SALSA20=y
CONFIG_CRYPTO_SALSA20_X86_64=y
CONFIG_CRYPTO_CHACHA20=y
CONFIG_CRYPTO_CHACHA20_X86_64=y
CONFIG_CRYPTO_SEED=y

View File

@@ -1,6 +1,6 @@
#
# Automatically generated file; DO NOT EDIT.
# Linux/x86 4.4.139 Kernel Configuration
# Linux/x86 4.4.144 Kernel Configuration
#
CONFIG_64BIT=y
CONFIG_X86_64=y
@@ -376,6 +376,7 @@ CONFIG_FREEZER=y
CONFIG_ZONE_DMA=y
CONFIG_SMP=y
CONFIG_X86_FEATURE_NAMES=y
CONFIG_X86_FAST_FEATURE_TESTS=y
# CONFIG_X86_X2APIC is not set
CONFIG_X86_MPPARSE=y
CONFIG_RETPOLINE=y
@@ -3461,7 +3462,6 @@ CONFIG_DEFAULT_IO_DELAY_TYPE=0
CONFIG_OPTIMIZE_INLINING=y
# CONFIG_DEBUG_ENTRY is not set
# CONFIG_DEBUG_NMI_SELFTEST is not set
# CONFIG_X86_DEBUG_STATIC_CPU_HAS is not set
CONFIG_X86_DEBUG_FPU=y
# CONFIG_PUNIT_ATOM_DEBUG is not set

View File

@@ -1,6 +1,6 @@
#
# Automatically generated file; DO NOT EDIT.
# Linux/x86 4.9.111 Kernel Configuration
# Linux/x86 4.9.115 Kernel Configuration
#
CONFIG_64BIT=y
CONFIG_X86_64=y

View File

@@ -1,4 +1,4 @@
From f76ec67c621f036c1c954b3e466ce206dd12b832 Mon Sep 17 00:00:00 2001
From 4fabc3ccbfcbf1b29f4a41dd5367b1fcd77fc65b Mon Sep 17 00:00:00 2001
From: Cheng-mean Liu <soccerl@microsoft.com>
Date: Tue, 11 Jul 2017 16:58:26 -0700
Subject: [PATCH 01/21] NVDIMM: reducded ND_MIN_NAMESPACE_SIZE from 4MB to 4KB
@@ -24,5 +24,5 @@ index 3f03567631cb..e63c201ed1ef 100644
enum ars_masks {
--
2.16.0
2.18.0

View File

@@ -1,4 +1,4 @@
From 1b58d3220a0d5736d2a08a2d00f721a28d2457e5 Mon Sep 17 00:00:00 2001
From b68f3db3c6b28c2a8f415fde4af410a0ecae54c8 Mon Sep 17 00:00:00 2001
From: Vitaly Kuznetsov <vkuznets@redhat.com>
Date: Sun, 29 Oct 2017 12:21:00 -0700
Subject: [PATCH 02/21] hyper-v: trace vmbus_on_msg_dpc()
@@ -107,5 +107,5 @@ index 2cd134dd94d2..9687e462fd43 100644
WARN_ONCE(1, "unknown msgtype=%d\n", hdr->msgtype);
goto msg_handled;
--
2.16.0
2.18.0

View File

@@ -1,4 +1,4 @@
From 700f8e4e6ac34dea996459aa3f4078f8dec707b7 Mon Sep 17 00:00:00 2001
From 2b634ed4e3b0ff1cc528f63867215524300f059e Mon Sep 17 00:00:00 2001
From: Vitaly Kuznetsov <vkuznets@redhat.com>
Date: Sun, 29 Oct 2017 12:21:01 -0700
Subject: [PATCH 03/21] hyper-v: trace vmbus_on_message()
@@ -45,5 +45,5 @@ index 9c2772922c76..d432aba5df8a 100644
#define TRACE_INCLUDE_PATH .
#undef TRACE_INCLUDE_FILE
--
2.16.0
2.18.0

View File

@@ -1,4 +1,4 @@
From 30af1856f6d382aa76f467bfeffaeb74d03c7028 Mon Sep 17 00:00:00 2001
From 908f2f26800936bf619f3617a927f4988a2b9421 Mon Sep 17 00:00:00 2001
From: Vitaly Kuznetsov <vkuznets@redhat.com>
Date: Sun, 29 Oct 2017 12:21:02 -0700
Subject: [PATCH 04/21] hyper-v: trace vmbus_onoffer()
@@ -76,5 +76,5 @@ index d432aba5df8a..488b873b563e 100644
#define TRACE_INCLUDE_PATH .
#undef TRACE_INCLUDE_FILE
--
2.16.0
2.18.0

View File

@@ -1,4 +1,4 @@
From da1a0d2b4c3060a0e3d1ff1283ded057ab373fd7 Mon Sep 17 00:00:00 2001
From 10ab7a26269bb3ff2e145b5fc2b73c752f437cd8 Mon Sep 17 00:00:00 2001
From: Vitaly Kuznetsov <vkuznets@redhat.com>
Date: Sun, 29 Oct 2017 12:21:03 -0700
Subject: [PATCH 05/21] hyper-v: trace vmbus_onoffer_rescind()
@@ -47,5 +47,5 @@ index 488b873b563e..dbbed1d1f327 100644
#define TRACE_INCLUDE_PATH .
#undef TRACE_INCLUDE_FILE
--
2.16.0
2.18.0

View File

@@ -1,4 +1,4 @@
From ee4c25f0bcad384e980d551d46ab0c393c0fa788 Mon Sep 17 00:00:00 2001
From fe0e871a20db0994cda89d358da3ff281a05e378 Mon Sep 17 00:00:00 2001
From: Vitaly Kuznetsov <vkuznets@redhat.com>
Date: Sun, 29 Oct 2017 12:21:04 -0700
Subject: [PATCH 06/21] hyper-v: trace vmbus_onopen_result()
@@ -56,5 +56,5 @@ index dbbed1d1f327..9757c19d1c08 100644
#define TRACE_INCLUDE_PATH .
#undef TRACE_INCLUDE_FILE
--
2.16.0
2.18.0

View File

@@ -1,4 +1,4 @@
From a7571d70dfeee3fc7d0ec2bd57ff999c31847437 Mon Sep 17 00:00:00 2001
From 5347396a1b2d7a2f98d55744e90d5c9f17b8dfb6 Mon Sep 17 00:00:00 2001
From: Vitaly Kuznetsov <vkuznets@redhat.com>
Date: Sun, 29 Oct 2017 12:21:05 -0700
Subject: [PATCH 07/21] hyper-v: trace vmbus_ongpadl_created()
@@ -56,5 +56,5 @@ index 9757c19d1c08..20734b7b341b 100644
#define TRACE_INCLUDE_PATH .
#undef TRACE_INCLUDE_FILE
--
2.16.0
2.18.0

View File

@@ -1,4 +1,4 @@
From 4c68e733849a998b3ed041cdd8ada083150c3873 Mon Sep 17 00:00:00 2001
From d378acbe4836fa5cf0690afca436f9f15ea6c59e Mon Sep 17 00:00:00 2001
From: Vitaly Kuznetsov <vkuznets@redhat.com>
Date: Sun, 29 Oct 2017 12:21:06 -0700
Subject: [PATCH 08/21] hyper-v: trace vmbus_ongpadl_torndown()
@@ -47,5 +47,5 @@ index 20734b7b341b..84c08cdf7235 100644
#define TRACE_INCLUDE_PATH .
#undef TRACE_INCLUDE_FILE
--
2.16.0
2.18.0

View File

@@ -1,4 +1,4 @@
From f59e846847ffbe8685be288e94f3ec703924ad3e Mon Sep 17 00:00:00 2001
From 23c634c3f3fb2f5afd713b05b01c26da168113f5 Mon Sep 17 00:00:00 2001
From: Vitaly Kuznetsov <vkuznets@redhat.com>
Date: Sun, 29 Oct 2017 12:21:07 -0700
Subject: [PATCH 09/21] hyper-v: trace vmbus_onversion_response()
@@ -51,5 +51,5 @@ index 84c08cdf7235..2a046547107f 100644
#define TRACE_INCLUDE_PATH .
#undef TRACE_INCLUDE_FILE
--
2.16.0
2.18.0

View File

@@ -1,4 +1,4 @@
From cd23e5413adde43e7d4aff60a4b96881aae9e233 Mon Sep 17 00:00:00 2001
From 999780655b2e1cccfaac2a168f9d2eed8732c76d Mon Sep 17 00:00:00 2001
From: Vitaly Kuznetsov <vkuznets@redhat.com>
Date: Sun, 29 Oct 2017 12:21:08 -0700
Subject: [PATCH 10/21] hyper-v: trace vmbus_request_offers()
@@ -51,5 +51,5 @@ index 2a046547107f..566ac0f2fe56 100644
#define TRACE_INCLUDE_PATH .
#undef TRACE_INCLUDE_FILE
--
2.16.0
2.18.0

View File

@@ -1,4 +1,4 @@
From 7523cc38767488c5642ef20915b322373a8e5b48 Mon Sep 17 00:00:00 2001
From bc01bbbfce0751627f28f5548c865d511193670a Mon Sep 17 00:00:00 2001
From: Vitaly Kuznetsov <vkuznets@redhat.com>
Date: Sun, 29 Oct 2017 12:21:09 -0700
Subject: [PATCH 11/21] hyper-v: trace vmbus_open()
@@ -66,5 +66,5 @@ index 566ac0f2fe56..38fedb803bd8 100644
#define TRACE_INCLUDE_PATH .
#undef TRACE_INCLUDE_FILE
--
2.16.0
2.18.0

View File

@@ -1,4 +1,4 @@
From 81628130428470d54c3105d9b66ff62cee986d88 Mon Sep 17 00:00:00 2001
From d39de3ec255911c6d43047f26b61c960cc0757ef Mon Sep 17 00:00:00 2001
From: Vitaly Kuznetsov <vkuznets@redhat.com>
Date: Sun, 29 Oct 2017 12:21:10 -0700
Subject: [PATCH 12/21] hyper-v: trace vmbus_close_internal()
@@ -54,5 +54,5 @@ index 38fedb803bd8..302bd4e964f0 100644
#define TRACE_INCLUDE_PATH .
#undef TRACE_INCLUDE_FILE
--
2.16.0
2.18.0

View File

@@ -1,4 +1,4 @@
From d014b76b33efbad1a7685d78371e804b7430d9cc Mon Sep 17 00:00:00 2001
From b092331d80b698a9ad7d822e7b9c0ef49b6d32f5 Mon Sep 17 00:00:00 2001
From: Vitaly Kuznetsov <vkuznets@redhat.com>
Date: Sun, 29 Oct 2017 12:21:11 -0700
Subject: [PATCH 13/21] hyper-v: trace vmbus_establish_gpadl()
@@ -92,5 +92,5 @@ index 302bd4e964f0..978e70bdc7c5 100644
#define TRACE_INCLUDE_PATH .
#undef TRACE_INCLUDE_FILE
--
2.16.0
2.18.0

View File

@@ -1,4 +1,4 @@
From 74d6050666291bf6e4fb2669ab82a42d3f048962 Mon Sep 17 00:00:00 2001
From 548ae4b4d29414184d57806ff3c773ac025946d2 Mon Sep 17 00:00:00 2001
From: Vitaly Kuznetsov <vkuznets@redhat.com>
Date: Sun, 29 Oct 2017 12:21:12 -0700
Subject: [PATCH 14/21] hyper-v: trace vmbus_teardown_gpadl()
@@ -57,5 +57,5 @@ index 978e70bdc7c5..cd33a52ef27f 100644
#define TRACE_INCLUDE_PATH .
#undef TRACE_INCLUDE_FILE
--
2.16.0
2.18.0

View File

@@ -1,4 +1,4 @@
From 8bb20f5f6ddacc0688610aba549bb6d0ab74701b Mon Sep 17 00:00:00 2001
From b03df401827cbee2964941a29fc4ac13ee9cbcb6 Mon Sep 17 00:00:00 2001
From: Vitaly Kuznetsov <vkuznets@redhat.com>
Date: Sun, 29 Oct 2017 12:21:13 -0700
Subject: [PATCH 15/21] hyper-v: trace vmbus_negotiate_version()
@@ -66,5 +66,5 @@ index cd33a52ef27f..f06284d64a8c 100644
#define TRACE_INCLUDE_PATH .
#undef TRACE_INCLUDE_FILE
--
2.16.0
2.18.0

View File

@@ -1,4 +1,4 @@
From cb865d2268415c7326b5509f0aac39bedfd0c286 Mon Sep 17 00:00:00 2001
From 210682a76fa6193fefc49e2bdbb01974fe0bef76 Mon Sep 17 00:00:00 2001
From: Vitaly Kuznetsov <vkuznets@redhat.com>
Date: Sun, 29 Oct 2017 12:21:14 -0700
Subject: [PATCH 16/21] hyper-v: trace vmbus_release_relid()
@@ -64,5 +64,5 @@ index f06284d64a8c..f0e437c3522f 100644
#define TRACE_INCLUDE_PATH .
#undef TRACE_INCLUDE_FILE
--
2.16.0
2.18.0

View File

@@ -1,4 +1,4 @@
From d26c5ea938cb39d563c624a05ee3d816003515ac Mon Sep 17 00:00:00 2001
From 89407d9dbcf558d08843ce0612f353eba3929837 Mon Sep 17 00:00:00 2001
From: Vitaly Kuznetsov <vkuznets@redhat.com>
Date: Sun, 29 Oct 2017 12:21:15 -0700
Subject: [PATCH 17/21] hyper-v: trace vmbus_send_tl_connect_request()
@@ -70,5 +70,5 @@ index f0e437c3522f..5382d9630306 100644
#define TRACE_INCLUDE_PATH .
#undef TRACE_INCLUDE_FILE
--
2.16.0
2.18.0

View File

@@ -1,4 +1,4 @@
From 591f3df8a93c88ba71a1cc1e6b798eb2fead21b9 Mon Sep 17 00:00:00 2001
From cb551169323e21deaa6f30a2bda27b08efa4790c Mon Sep 17 00:00:00 2001
From: Vitaly Kuznetsov <vkuznets@redhat.com>
Date: Sun, 29 Oct 2017 12:21:16 -0700
Subject: [PATCH 18/21] hyper-v: trace channel events
@@ -97,5 +97,5 @@ index 9687e462fd43..27d5efd696ad 100644
case HV_CALL_ISR:
vmbus_channel_isr(channel);
--
2.16.0
2.18.0

View File

@@ -1,4 +1,4 @@
From e128ecf011af52b61e1d4a610c6ba22355345438 Mon Sep 17 00:00:00 2001
From 9cce3eb78d66237935a7c73d7d62ec513eef0da3 Mon Sep 17 00:00:00 2001
From: Christian Borntraeger <borntraeger@de.ibm.com>
Date: Tue, 12 Dec 2017 09:08:35 +0100
Subject: [PATCH 19/21] serial: forbid 8250 on s390
@@ -31,5 +31,5 @@ index a5c0ef1e7695..16b1496e6105 100644
---help---
This selects whether you want to include the driver for the standard
--
2.16.0
2.18.0

View File

@@ -1,4 +1,4 @@
From f2c4b6298da4da09e47c14adc1160f9e641a7a8a Mon Sep 17 00:00:00 2001
From 8ba5c4a3d02c3427ec0633a3348a47d41ae369ad Mon Sep 17 00:00:00 2001
From: Cathy Avery <cavery@redhat.com>
Date: Tue, 31 Oct 2017 08:52:06 -0400
Subject: [PATCH 20/21] scsi: storvsc: Allow only one remove lun work item to
@@ -128,5 +128,5 @@ index beb585ddc07d..e94f75e25cb1 100644
storvsc_dev_remove(dev);
scsi_host_put(host);
--
2.16.0
2.18.0

View File

@@ -1,4 +1,4 @@
From 5691a3c7337cc0fd044ef4144af28c733371feb9 Mon Sep 17 00:00:00 2001
From 74fe018d0f5f6fb94553b7fc8a7f515fb98a9584 Mon Sep 17 00:00:00 2001
From: Long Li <longli@microsoft.com>
Date: Tue, 31 Oct 2017 14:58:08 -0700
Subject: [PATCH 21/21] scsi: storvsc: Avoid excessive host scan on controller
@@ -106,5 +106,5 @@ index e94f75e25cb1..66b1b6ad0ae0 100644
ret = scsi_add_host(host, &device->device);
if (ret != 0)
--
2.16.0
2.18.0

View File

@@ -1,4 +1,4 @@
From b9805f49b1929c549458932fe494979881cdf4bd Mon Sep 17 00:00:00 2001
From a005e66627723c7cb6bf888bf98df50d67c65c9f Mon Sep 17 00:00:00 2001
From: Arnaldo Carvalho de Melo <acme@redhat.com>
Date: Thu, 2 Mar 2017 12:55:49 -0300
Subject: [PATCH 01/12] tools build: Add test for sched_getcpu()
@@ -146,5 +146,5 @@ index e72d370889f8..605c4812430f 100644
int is_printable_array(char *p, unsigned int len);
--
2.16.0
2.18.0

View File

@@ -1,4 +1,4 @@
From f4761b9a8fa68143ae262e468f01170e0287da72 Mon Sep 17 00:00:00 2001
From d1cfa4ea52df5e98b3056cf24ef42a2251181a65 Mon Sep 17 00:00:00 2001
From: Arnaldo Carvalho de Melo <acme@redhat.com>
Date: Thu, 13 Oct 2016 17:12:35 -0300
Subject: [PATCH 02/12] perf jit: Avoid returning garbage for a ret variable
@@ -66,5 +66,5 @@ index 95f0884aae02..f3ed3c963c71 100644
while ((jr = jit_get_next_entry(jd))) {
switch(jr->prefix.id) {
--
2.16.0
2.18.0

View File

@@ -1,4 +1,4 @@
From 33e03dbc466fcc9b7228318caa98275797cc0ad5 Mon Sep 17 00:00:00 2001
From 72ddf854fc7145d80c3a63780c44caceae992e32 Mon Sep 17 00:00:00 2001
From: Dexuan Cui <decui@microsoft.com>
Date: Sat, 23 Jul 2016 01:35:51 +0000
Subject: [PATCH 03/12] hv_sock: introduce Hyper-V Sockets
@@ -28,13 +28,13 @@ Origin: https://patchwork.kernel.org/patch/9244467/
MAINTAINERS | 2 +
include/linux/hyperv.h | 13 +
include/linux/socket.h | 4 +-
include/net/af_hvsock.h | 78 +++
include/net/af_hvsock.h | 78 ++
include/uapi/linux/hyperv.h | 23 +
net/Kconfig | 1 +
net/Makefile | 1 +
net/hv_sock/Kconfig | 10 +
net/hv_sock/Makefile | 3 +
net/hv_sock/af_hvsock.c | 1507 +++++++++++++++++++++++++++++++++++++++++++
net/hv_sock/af_hvsock.c | 1507 +++++++++++++++++++++++++++++++++++
10 files changed, 1641 insertions(+), 1 deletion(-)
create mode 100644 include/net/af_hvsock.h
create mode 100644 net/hv_sock/Kconfig
@@ -1787,5 +1787,5 @@ index 000000000000..331d3759f5cb
+MODULE_DESCRIPTION("Hyper-V Sockets");
+MODULE_LICENSE("Dual BSD/GPL");
--
2.16.0
2.18.0

View File

@@ -1,4 +1,4 @@
From 5d86a38799a0d580165bbd6469d57f34ce3f08f8 Mon Sep 17 00:00:00 2001
From dec39efee06e309bf09f86740c91cedf9e5b166c Mon Sep 17 00:00:00 2001
From: Rolf Neugebauer <rolf.neugebauer@gmail.com>
Date: Mon, 23 May 2016 18:55:45 +0100
Subject: [PATCH 04/12] vmbus: Don't spam the logs with unknown GUIDs
@@ -26,5 +26,5 @@ index 9360cdce740e..d838074e9add 100644
}
--
2.16.0
2.18.0

View File

@@ -1,4 +1,4 @@
From 147cf4c10665ceca492c49843cfb61cc87f767ba Mon Sep 17 00:00:00 2001
From cd8b87a97135628a3909163a8aca40938a9a5ab6 Mon Sep 17 00:00:00 2001
From: Alex Ng <alexng@messages.microsoft.com>
Date: Sun, 6 Nov 2016 13:14:07 -0800
Subject: [PATCH 05/12] Drivers: hv: utils: Fix the mapping between host
@@ -44,5 +44,5 @@ index bcd06306f3e8..e7707747f56d 100644
}
--
2.16.0
2.18.0

View File

@@ -1,4 +1,4 @@
From 26247df4b85bda5e59fbdab1b987e995d5ff1884 Mon Sep 17 00:00:00 2001
From 4a0119831cd7ee385080a6320cde33b7993b590f Mon Sep 17 00:00:00 2001
From: Alex Ng <alexng@messages.microsoft.com>
Date: Sun, 6 Nov 2016 13:14:10 -0800
Subject: [PATCH 06/12] Drivers: hv: vss: Improve log messages.
@@ -101,5 +101,5 @@ index a6707133c297..5c95ba1e2ecf 100644
return 0;
}
--
2.16.0
2.18.0

View File

@@ -1,4 +1,4 @@
From de104795adafc968575c511b5b6ceaf98f9b3dd0 Mon Sep 17 00:00:00 2001
From fed70aa63d61707e537fcdb4c62ff70a0ddb3645 Mon Sep 17 00:00:00 2001
From: Alex Ng <alexng@messages.microsoft.com>
Date: Sun, 6 Nov 2016 13:14:11 -0800
Subject: [PATCH 07/12] Drivers: hv: vss: Operation timeouts should match host
@@ -44,5 +44,5 @@ index 5c95ba1e2ecf..eee238cc60bd 100644
rc = hvutil_transport_send(hvt, vss_msg, sizeof(*vss_msg), NULL);
if (rc) {
--
2.16.0
2.18.0

View File

@@ -1,4 +1,4 @@
From 6c8814fbc2787f827b26b4413609b4da3b20ced5 Mon Sep 17 00:00:00 2001
From acba0dbe222b91f0e697960d22635f69d9392ef3 Mon Sep 17 00:00:00 2001
From: Alex Ng <alexng@messages.microsoft.com>
Date: Sat, 28 Jan 2017 12:37:17 -0700
Subject: [PATCH 08/12] Drivers: hv: vmbus: Use all supported IC versions to
@@ -25,12 +25,12 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Origin: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
(cherry picked from commit a1656454131880980bc3a5313c8bf66ef5990c91)
---
drivers/hv/channel_mgmt.c | 80 +++++++++++++++++++++++++++-------------
drivers/hv/hv_fcopy.c | 20 +++++++---
drivers/hv/hv_kvp.c | 41 +++++++++------------
drivers/hv/hv_snapshot.c | 18 +++++++--
drivers/hv/hv_util.c | 94 +++++++++++++++++++++++++----------------------
include/linux/hyperv.h | 7 ++--
drivers/hv/channel_mgmt.c | 80 ++++++++++++++++++++++-----------
drivers/hv/hv_fcopy.c | 20 ++++++---
drivers/hv/hv_kvp.c | 41 +++++++----------
drivers/hv/hv_snapshot.c | 18 ++++++--
drivers/hv/hv_util.c | 94 +++++++++++++++++++++------------------
include/linux/hyperv.h | 7 +--
6 files changed, 154 insertions(+), 106 deletions(-)
diff --git a/drivers/hv/channel_mgmt.c b/drivers/hv/channel_mgmt.c
@@ -488,5 +488,5 @@ index c9af8369b4f7..7df9eb8f0cf7 100644
void hv_event_tasklet_disable(struct vmbus_channel *channel);
void hv_event_tasklet_enable(struct vmbus_channel *channel);
--
2.16.0
2.18.0

View File

@@ -1,4 +1,4 @@
From 24675a30a9fccb4624b52c536f0bfe6edd66cd3c Mon Sep 17 00:00:00 2001
From ee76170a5bed625fd873b96150668b15b9ed9c33 Mon Sep 17 00:00:00 2001
From: Alex Ng <alexng@messages.microsoft.com>
Date: Sat, 28 Jan 2017 12:37:18 -0700
Subject: [PATCH 09/12] Drivers: hv: Log the negotiated IC versions.
@@ -114,5 +114,5 @@ index f3797c07be10..89440c2eb346 100644
hb_srv_version & 0xFFFF);
}
--
2.16.0
2.18.0

View File

@@ -1,4 +1,4 @@
From 9fe8f93383072722f38a4b1ccfe19467896e3ba9 Mon Sep 17 00:00:00 2001
From eb6231df098695d8317880c2975c440a39c676d3 Mon Sep 17 00:00:00 2001
From: Dexuan Cui <decui@microsoft.com>
Date: Sun, 26 Mar 2017 16:42:20 +0800
Subject: [PATCH 10/12] vmbus: fix missed ring events on boot
@@ -52,5 +52,5 @@ index 095dd37367de..effac8042dc6 100644
void hv_process_channel_removal(struct vmbus_channel *channel, u32 relid)
--
2.16.0
2.18.0

View File

@@ -1,4 +1,4 @@
From 9551c3813383c6be11cc5a899a593657a4cceb88 Mon Sep 17 00:00:00 2001
From 25141f3ada36087ad07efc8a8143d29991186dda Mon Sep 17 00:00:00 2001
From: Dexuan Cui <decui@microsoft.com>
Date: Wed, 29 Mar 2017 18:37:10 +0800
Subject: [PATCH 11/12] vmbus: remove "goto error_clean_msglist" in
@@ -56,5 +56,5 @@ index 1606e7f08f4b..1caed01954f6 100644
vmbus_teardown_gpadl(newchannel, newchannel->ringbuffer_gpadlhandle);
kfree(open_info);
--
2.16.0
2.18.0

View File

@@ -1,4 +1,4 @@
From 1d709cd6c153080686b388c02d42e13d71dd5da1 Mon Sep 17 00:00:00 2001
From 9210fd3944ddab9ab658cb6fd3b8816cc749ae4e Mon Sep 17 00:00:00 2001
From: Dexuan Cui <decui@microsoft.com>
Date: Fri, 24 Mar 2017 20:53:18 +0800
Subject: [PATCH 12/12] vmbus: dynamically enqueue/dequeue the channel on
@@ -8,9 +8,9 @@ Signed-off-by: Dexuan Cui <decui@microsoft.com>
Origin: git@github.com:dcui/linux.git
(cherry picked from commit bee4910daa4aed57ce60d2e2350e3cc120c383ca)
---
drivers/hv/channel.c | 16 ++++++++++---
drivers/hv/channel_mgmt.c | 58 ++++++++++++++++++++---------------------------
include/linux/hyperv.h | 3 +++
drivers/hv/channel.c | 16 +++++++++--
drivers/hv/channel_mgmt.c | 58 ++++++++++++++++-----------------------
include/linux/hyperv.h | 3 ++
3 files changed, 40 insertions(+), 37 deletions(-)
diff --git a/drivers/hv/channel.c b/drivers/hv/channel.c
@@ -173,5 +173,5 @@ index 7df9eb8f0cf7..a87757cf277b 100644
void vmbus_setevent(struct vmbus_channel *channel);
--
2.16.0
2.18.0

View File

@@ -1,16 +1,16 @@
kernel:
image: linuxkit/kernel:4.14.54
image: linuxkit/kernel:4.14.58
cmdline: "console=tty0 console=ttyS0 console=ttyAMA0"
init:
- linuxkit/init:v0.5
- linuxkit/runc:v0.5
- linuxkit/containerd:v0.5
- linuxkit/ca-certificates:v0.5
- linuxkit/init:v0.6
- linuxkit/runc:v0.6
- linuxkit/containerd:v0.6
- linuxkit/ca-certificates:v0.6
onboot:
- name: sysctl
image: linuxkit/sysctl:v0.5
image: linuxkit/sysctl:v0.6
- name: dhcpcd
image: linuxkit/dhcpcd:v0.5
image: linuxkit/dhcpcd:v0.6
command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"]
onshutdown:
- name: shutdown
@@ -18,11 +18,11 @@ onshutdown:
command: ["/bin/echo", "so long and thanks for all the fish"]
services:
- name: getty
image: linuxkit/getty:v0.5
image: linuxkit/getty:v0.6
env:
- INSECURE=true
- name: rngd
image: linuxkit/rngd:v0.5
image: linuxkit/rngd:v0.6
- name: nginx
image: nginx:1.13.8-alpine
capabilities:

View File

@@ -1,4 +1,4 @@
FROM linuxkit/alpine:daed76b8f1d28cdeeee215a95b9671c682a405dc AS mirror
FROM linuxkit/alpine:3683c9a66cd4da40bd7d6c7da599b2dcd738b559 AS mirror
RUN mkdir -p /out/etc/apk && cp -r /etc/apk/* /out/etc/apk/
RUN apk add --no-cache --initdb -p /out \
@@ -6,7 +6,7 @@ RUN apk add --no-cache --initdb -p /out \
busybox
RUN rm -rf /out/etc/apk /out/lib/apk /out/var/cache
FROM linuxkit/alpine:daed76b8f1d28cdeeee215a95b9671c682a405dc AS mirror2
FROM linuxkit/alpine:3683c9a66cd4da40bd7d6c7da599b2dcd738b559 AS mirror2
RUN mkdir -p /out/etc/apk && cp -r /etc/apk/* /out/etc/apk/
RUN apk add --no-cache --initdb -p /out \
busybox-initscripts

View File

@@ -1,4 +1,4 @@
FROM linuxkit/alpine:daed76b8f1d28cdeeee215a95b9671c682a405dc AS mirror
FROM linuxkit/alpine:3683c9a66cd4da40bd7d6c7da599b2dcd738b559 AS mirror
RUN mkdir -p /out/etc/apk && cp -r /etc/apk/* /out/etc/apk/
RUN apk add --initdb -p /out alpine-baselayout apk-tools audit busybox tini

View File

@@ -5,7 +5,7 @@ RUN apt-get update && apt-get install -y qemu-user-static && \
mv /usr/bin/qemu-arm-static /usr/bin/qemu-arm && \
mv /usr/bin/qemu-ppc64le-static /usr/bin/qemu-ppc64le
FROM linuxkit/alpine:daed76b8f1d28cdeeee215a95b9671c682a405dc AS mirror
FROM linuxkit/alpine:3683c9a66cd4da40bd7d6c7da599b2dcd738b559 AS mirror
RUN apk add --no-cache go musl-dev
ENV GOPATH=/go PATH=$PATH:/go/bin

View File

@@ -1,4 +1,4 @@
FROM linuxkit/alpine:daed76b8f1d28cdeeee215a95b9671c682a405dc as alpine
FROM linuxkit/alpine:3683c9a66cd4da40bd7d6c7da599b2dcd738b559 as alpine
RUN apk add ca-certificates

View File

@@ -1,4 +1,4 @@
FROM linuxkit/alpine:daed76b8f1d28cdeeee215a95b9671c682a405dc as build
FROM linuxkit/alpine:3683c9a66cd4da40bd7d6c7da599b2dcd738b559 as build
RUN apk add --no-cache bash go git musl-dev linux-headers make
@@ -16,7 +16,7 @@ RUN go get -d ${GITREPO} \
&& mv cadvisor /usr/bin/
FROM linuxkit/alpine:daed76b8f1d28cdeeee215a95b9671c682a405dc AS mirror
FROM linuxkit/alpine:3683c9a66cd4da40bd7d6c7da599b2dcd738b559 AS mirror
RUN mkdir -p /out/etc/apk && cp -r /etc/apk/* /out/etc/apk/
RUN apk add --no-cache --initdb -p /out \

View File

@@ -1,4 +1,4 @@
FROM linuxkit/alpine:daed76b8f1d28cdeeee215a95b9671c682a405dc as alpine
FROM linuxkit/alpine:3683c9a66cd4da40bd7d6c7da599b2dcd738b559 as alpine
RUN apk add tzdata
WORKDIR $GOPATH/src/github.com/containerd/containerd

View File

@@ -1,4 +1,4 @@
FROM linuxkit/alpine:daed76b8f1d28cdeeee215a95b9671c682a405dc AS mirror
FROM linuxkit/alpine:3683c9a66cd4da40bd7d6c7da599b2dcd738b559 AS mirror
RUN mkdir -p /out/etc/apk && cp -r /etc/apk/* /out/etc/apk/
RUN apk add --no-cache --initdb -p /out \
alpine-baselayout \

View File

@@ -1,4 +1,4 @@
FROM linuxkit/alpine:daed76b8f1d28cdeeee215a95b9671c682a405dc AS mirror
FROM linuxkit/alpine:3683c9a66cd4da40bd7d6c7da599b2dcd738b559 AS mirror
RUN mkdir -p /out/etc/apk && cp -r /etc/apk/* /out/etc/apk/
RUN apk add --no-cache --initdb -p /out \
@@ -15,7 +15,7 @@ RUN apk add --no-cache --initdb -p /out \
&& true
RUN rm -rf /out/etc/apk /out/lib/apk /out/var/cache
FROM linuxkit/alpine:daed76b8f1d28cdeeee215a95b9671c682a405dc AS build
FROM linuxkit/alpine:3683c9a66cd4da40bd7d6c7da599b2dcd738b559 AS build
RUN apk add --no-cache go musl-dev
ENV GOPATH=/go PATH=$PATH:/go/bin

View File

@@ -1,4 +1,4 @@
FROM linuxkit/alpine:daed76b8f1d28cdeeee215a95b9671c682a405dc AS build
FROM linuxkit/alpine:3683c9a66cd4da40bd7d6c7da599b2dcd738b559 AS build
RUN apk add --no-cache git
# Make sure you also update the FW_COMMIT in ../firmware/Dockerfile

View File

@@ -1,7 +1,7 @@
# Make modules from a recentish kernel available
FROM linuxkit/kernel:4.14.28 AS kernel
FROM linuxkit/alpine:daed76b8f1d28cdeeee215a95b9671c682a405dc AS build
FROM linuxkit/alpine:3683c9a66cd4da40bd7d6c7da599b2dcd738b559 AS build
RUN apk add --no-cache git kmod
# Clone the firmware repository

View File

@@ -1,4 +1,4 @@
FROM linuxkit/alpine:daed76b8f1d28cdeeee215a95b9671c682a405dc AS mirror
FROM linuxkit/alpine:3683c9a66cd4da40bd7d6c7da599b2dcd738b559 AS mirror
RUN mkdir -p /out/etc/apk && cp -r /etc/apk/* /out/etc/apk/
RUN apk add --no-cache --initdb -p /out \
@@ -15,7 +15,7 @@ RUN apk add --no-cache --initdb -p /out \
&& true
RUN rm -rf /out/etc/apk /out/lib/apk /out/var/cache
FROM linuxkit/alpine:daed76b8f1d28cdeeee215a95b9671c682a405dc AS build
FROM linuxkit/alpine:3683c9a66cd4da40bd7d6c7da599b2dcd738b559 AS build
RUN apk add --no-cache go musl-dev
ENV GOPATH=/go PATH=$PATH:/go/bin

View File

@@ -1,4 +1,4 @@
FROM linuxkit/alpine:daed76b8f1d28cdeeee215a95b9671c682a405dc AS mirror
FROM linuxkit/alpine:3683c9a66cd4da40bd7d6c7da599b2dcd738b559 AS mirror
RUN mkdir -p /out/etc/apk && cp -r /etc/apk/* /out/etc/apk/
RUN apk add --no-cache --initdb -p /out \

View File

@@ -1,4 +1,4 @@
FROM linuxkit/alpine:daed76b8f1d28cdeeee215a95b9671c682a405dc AS mirror
FROM linuxkit/alpine:3683c9a66cd4da40bd7d6c7da599b2dcd738b559 AS mirror
RUN apk add --no-cache go musl-dev git
ENV GOPATH=/go PATH=$PATH:/go/bin

View File

@@ -1,4 +1,4 @@
FROM linuxkit/alpine:daed76b8f1d28cdeeee215a95b9671c682a405dc AS build
FROM linuxkit/alpine:3683c9a66cd4da40bd7d6c7da599b2dcd738b559 AS build
RUN apk add --no-cache --initdb alpine-baselayout make gcc musl-dev git linux-headers
ADD usermode-helper.c ./
@@ -16,7 +16,7 @@ RUN mkdir /tmp/bin && cd /tmp/bin/ && cp /go/bin/rc.init . && ln -s rc.init rc.s
RUN cd /go/src/cmd/service && ./skanky-vendor.sh $GOPATH/src/github.com/containerd/containerd
RUN go-compile.sh /go/src/cmd/service
FROM linuxkit/alpine:daed76b8f1d28cdeeee215a95b9671c682a405dc AS mirror
FROM linuxkit/alpine:3683c9a66cd4da40bd7d6c7da599b2dcd738b559 AS mirror
RUN mkdir -p /out/etc/apk && cp -r /etc/apk/* /out/etc/apk/
RUN apk add --no-cache --initdb -p /out alpine-baselayout busybox musl

View File

@@ -202,7 +202,7 @@ func start(ctx context.Context, service, sock, basePath, dumpSpec string) (strin
io := func(id string) (cio.IO, error) {
stdoutFile := logger.Path(service + ".out")
stderrFile := logger.Path(service + ".err")
stderrFile := logger.Path(service)
return &logio{
cio.Config{
Stdin: "/dev/null",

View File

@@ -29,6 +29,7 @@ type Log interface {
Path(string) string // Path of the log file (may be a FIFO)
Open(string) (io.WriteCloser, error) // Opens a log stream
Dump(string) // Copies logs to the console
Symlink(string) // Symlinks to the log directory (if there is one)
}
// GetLog returns the log destination we should use.
@@ -82,6 +83,16 @@ func (f *fileLog) Dump(n string) {
}
}
// Symlinks to the log directory. This is useful if we are logging directly to tmpfs and now need to symlink from a permanent disk.
func (f *fileLog) Symlink(path string) {
parent := filepath.Dir(path)
if err := os.MkdirAll(parent, 0755); err != nil {
log.Printf("Error creating secondary log directory %s: %v", parent, err)
} else if err := os.Symlink(f.dir, path); err != nil && !os.IsExist(err) {
log.Printf("Error creating symlink from %s to %s: %v", path, f.dir, err)
}
}
type remoteLog struct {
fifoDir string
}
@@ -164,6 +175,11 @@ func (r *remoteLog) Dump(n string) {
}
}
// Symlinks to the log directory. This is a no-op because there is no log directory.
func (r *remoteLog) Symlink(path string) {
return
}
func sendToLogger(name string, fd int) error {
var ctlSocket int
var err error

View File

@@ -14,7 +14,7 @@ import (
"golang.org/x/sys/unix"
)
// Note these definitions are from moby/tool/src/moby/config.go and should be kept in sync
// Note these definitions are from src/moby/config.go and should be kept in sync
// Runtime is the type of config processed at runtime, not used to build the OCI spec
type Runtime struct {

View File

@@ -87,7 +87,7 @@ func runcInit(rootPath, serviceType string) int {
}
defer stdout.Close()
stderrLog := serviceType + "." + name + ".err"
stderrLog := serviceType + "." + name
stderr, err := logger.Open(stderrLog)
if err != nil {
log.Printf("Error opening stderr log connection: %v", err)
@@ -160,11 +160,7 @@ func runcInit(rootPath, serviceType string) int {
_ = os.RemoveAll(tmpdir)
// make sure the link exists from /var/log/onboot -> /run/log/onboot
if err := os.MkdirAll(varLogDir, 0755); err != nil {
log.Printf("Error creating secondary log directory %s: %v", varLogDir, err)
} else if err := os.Symlink(logDir, varLogLink); err != nil && !os.IsExist(err) {
log.Printf("Error creating symlink from %s to %s: %v", varLogLink, logDir, err)
}
logger.Symlink(varLogLink)
return status
}

Some files were not shown because too many files have changed in this diff Show More