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>
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>
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>
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>
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>
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>
If the flag is set on push, then the image will have the license
set to enabled the currently experimental netsted virtualisation
feature. The flag currently also needs to be set on run to make
sure the right CPU model (at least Haswell) is selected.
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
Pulls in:
f816553 Merge pull request #195 from ijc/prepend-rootfs-mounts
0a6d69d Prepend the rootfs mounts to the user specified runtime.mounts.
Signed-off-by: Ian Campbell <ijc@docker.com>
Will return the list of all hosts that are part of a vCenter DataCenter
and choose one at random to use.
Signed-off-by: Dan Finneran <daniel.finneran@gmail.com>
This simply starts a web server serving the specified directory.
It's useful for PXE booting.
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
This currently just copies the kernel/initrd to a destination
and writes the iPXE script there as well. The scheme is flexible
enough to support scp or other means for pushing in the future.
The kernel/initrd are conditionally decompressed (default for arm64).
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
Using the userdat to pass the iPXE script precludes us from passing
actual userdata to the instance. Instead pass a URL to the iPXE script.
The script is expected to be a <base-url>/<name>-packet.ipxe.
When starting a server also serve the iPXE script from memory (not
the file system). The http server needed extending to differentiate
between the serving files and the iPXE script and ServeMux is used
to differentiate based on path.
A subsequent commit will provide an option to write the iPXE script
to disk.
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
prefix packet.net specific functions with 'packet' and make
non-packet specific functions, such as validateHTTPURL()
more generic so that they can easily be moved to 'utils.go'
should they be needed elsewhere.
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>