Commit Graph

791 Commits

Author SHA1 Message Date
Justin Cormack
c9db3f0625 Add support for userdata on GCP
This was missing in the linuxkit CLI, even though we support it in the
metadata package.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2018-06-06 16:05:51 -07:00
Rolf Neugebauer
5de0a86293 Update use of tools to latest
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@gmail.com>
2018-05-12 12:38:05 +01:00
Justin Cormack
415d0d3c32 Update to allow the new locations for Docker for Mac socket paths
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2018-05-10 13:32:38 +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
Rolf Neugebauer
0b5ea3fcc3 cmd: Add support for kernel+squashfs to the qemu runner
Unlike the hyperkit runner, the qemu runner already had better
support for auto-detecting the boot method so the changes
are less invasive (and backward compatible).

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-04-16 18:39:32 +01:00
Rolf Neugebauer
0e3c88d47c cmd: Add support for squashfs root filesystem to hyperkit runnner
Previous commits added support for building 'kernel+squashfs'.
This commit adds support for booting this build format on hyperkit.

The changes are a little bigger because some restructuring of the
code was required to support a third (after kernel+initrd and EFI
ISO) boot method.

To keep the code simpler this commit also removes some auto-detection
code for ISO booting. Users now have to specify '-iso -uefi' on the
command line to boot an EFI ISO. Previously, only '-uefi' was
required.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-04-16 18:39:31 +01:00
Rolf Neugebauer
c26a83011d vendor: Update hyperkit go bindings
This contains a small fix to the disk binadings and allows
booting with a kernel alone (no initrd).

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-04-16 18:39:31 +01:00
Rolf Neugebauer
ccb0007947 cmd: Register local mkimage- images with the vendored moby tool
This allows us to update tags for these locally without having
to re-vendor.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-04-16 18:39:31 +01:00
Rolf Neugebauer
69679d1db7 vendor: Update moby/tool vendoring
This includes two improvements:
- being able to specify the packages used for building images
- support for building squashfs images.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-04-16 18:39:31 +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
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
Ian Campbell
3be156da13 pkg: build: do not infer a release if not pushing
If you happen to be exactly on a tag then:

    $ linuxkit pkg build --dev pkg/init
    Building "ijc/init:dev"
    Cannot release "v0.3" if not pushing

Do not try and infer a release if not pushing so this is possible again.

The subsequent check for `bo.release != "" && !bo.push` remains since the
caller could have used `WithRelease` but not `WithPush`. Our CLI never does
this, but a hypothetical other user of the library might.

Signed-off-by: Ian Campbell <ijc@docker.com>
2018-04-06 14:13:08 +01:00
Rolf Neugebauer
db663d30a6 Update YAMLs to released packages
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-04-05 15:23:20 +01:00
Rolf Neugebauer
c4f613e047 cmd: Update the moby tool vendoring
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-04-05 14:00:10 +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
Rolf Neugebauer
4a0813ec2e cmd: Update linuxkit/qemu to the latest
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-04-05 10:59:12 +01:00
Justin Cormack
7be989363b Update moby tool vendoring
This only includes https://github.com/moby/tool/pull/210 which
makes bind mounts into containers rshared not rprivate by default,
which makes debug easier as you can see them from the host.

Signed-off-by: Justin Cormack <justin@specialbusservice.com>
2018-04-04 19:00:48 +01:00
Rolf Neugebauer
d7d072b2a9 cmd: Update manifest_push_script.go
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-04-03 16:08:00 +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
Rolf Neugebauer
0840aff18e cmd: Update moby/tool to latest
This picks up the updated mkimage tools

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@gmail.com>
2018-03-23 20:15:32 +00: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 Ko
df660d35c7 Subcommand serve should parse flags.
Signed-off-by: Justin Ko <justin.ko@oracle.com>
2018-03-07 14:59:14 -08:00
Justin Cormack
ee6d320706 Update moby tool
Also update its notary vendor as that was part of update.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2018-03-07 09:17:41 +00:00
Avi Deitcher
5d30b45cbc Merge pull request #2942 from deitch/onboot-stream-logs
Add logging to /var/log for onboot containers
2018-03-02 16:47:54 +02:00
Avi Deitcher
6f524eb616 Update hashes for linuxkit/init
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2018-03-02 15:51:09 +02:00
Justin Cormack
adebf0377c Merge pull request #2933 from pcfdev-forks/master
Configure guest with 9P mount and vsock port when using existing VPNKit instance
2018-03-01 11:22:41 +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
Rolf Neugebauer
6d4905ba2a cmd: Update generated code.
The source script changed

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-02-28 16:41:23 +00:00
Justin Cormack
cc137cfbf3 Merge pull request #2932 from garthy/support_http_proxy
Support http proxy environment variables in linuxkit build
2018-02-27 19:21:04 +00:00
Emily Casey
4dde00b05c Configure guest with 9P mount and vsock port when using existing VPNKit instance
Signed-off-by: Emily Casey <ecasey@pivotal.io>
2018-02-27 09:21:28 -05:00
Rolf Neugebauer
0d8fab9ac9 Merge pull request #2927 from alicefr/support_s390
Add s390x support for Linuxkit binary and tools
2018-02-27 13:47:10 +00:00
Garth Bushell
10ec3c5803 Support http proxy environment variables in docker build
Signed-off-by: Garth Bushell <garth.bushell@oracle.com>
2018-02-27 13:28:11 +00:00
Alice Frosi
d6b44f7881 Add s390x support for Linuxkit binary
This PR adds the basic support for s390 architecture on linuxkit
command.

Signed-off-by: Alice Frosi <alice@linux.vnet.ibm.com>
2018-02-27 12:23:47 +00:00
Olaf Bergner
f37a59bd1a Add cli option '--bridgeadapter' to 'linuxkit vbox run'
Starting a virtualbox vm in bridged networking mode requires the host's
network interface to attach to the bridge being specified. This commit
adds command line option '--bridgeadapter iface' to 'linuxkit vbox run',
where 'iface' is the host's network interface to use in bridged mode.

Fixes: #2929

Signed-off-by: Olaf Bergner <olaf.bergner@gmx.de>
2018-02-26 21:20:38 +01:00
Scott Coulton
a7ec17b08f Added a fail if the user sets detached to true when qemu is running locally 2018-02-19 11:53:13 +11:00
Scott Coulton
224ade8fea This commit adds the functionality to run the qemu container detached 2018-02-15 15:09:10 +11:00
Rolf Neugebauer
46b20a2d0c Merge pull request #2899 from rn/qemu
Allow choice of qemu binary and acceleration
2018-02-05 10:20:26 +00:00
Rolf Neugebauer
5d0e677397 cmd/qemu: Enable additional accelerators
Upstream qemu supports accelerators other than kvm. Allow the user
to choose. On Linux we still default to 'lvm' if available. On
macOS we try the new 'hvf' accelerator, if available.

Disable acceleration if the host arch does not match requested
qemu arch.

Also change the LINUXKIT_QEMU_KVM env var to LINUXKIT_QEMU_ACCEL
and use the functions in utils.go for env var overrides.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-02-02 18:05:39 +00:00
Roman Shaposhnik
528e3e6850 Make it possible to key the package tags off of top level tree hash
Closes #2887

Signed-off-by: Roman Shaposhnik <rvs@zededa.com>
2018-02-02 04:05:16 -08:00
Rolf Neugebauer
c5b3d088b0 cmd: Add option to override the qemu binary to use
It still defaults to whatever is in your PATH but it's
useful to override when experimenting with different
qemu builds.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-02-01 17:39:40 +00:00
Justin Cormack
e98cc7a328 Do not print git commit if empty
fix #2891

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2018-01-26 14:32:46 +00:00
Rolf Neugebauer
4e8d7cd67d cmd: Update moby/tool vendoring
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-01-25 19:40:28 +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
5c1ebdbaa2 Update LinuxKit images to the latest
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-01-25 14:15:52 +00:00
Rolf Neugebauer
bd6264458a cmd: Update linuxkit/qemu to the latest version
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-01-25 13:33:11 +00:00
Rolf Neugebauer
e743c1b027 Merge pull request #2882 from rn/hyperv
cmd/hyperv: Use Default Switch if present
2018-01-24 19:20:53 +00:00
Rolf Neugebauer
83a7e29730 cmd/hyperv: Use Default Switch if present
The Windows 10 Fall Creators Update added a new 'Default
Switch' (which is a NAT switch). Use it if present and the
user has not specified a switch.

Also, handle External switches with spaces in them.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-01-24 16:52:17 +00:00
Rolf Neugebauer
87667051f2 cmd: Adjust run_hyperkit to interface changes
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-01-24 16:06:09 +00:00