iAdd a bunch of packages which are useful for compiling
some of the tools shipped with the Linux kernel source code.
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
- no longer uses several of the `mkimage-*` tools in favour of dogfooding
with `linuxkit` and using the `mkimage` package.
- fix the qemu docker container fallbacks to work better when multiple
paths are used for disks and the image.
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
Adding a mkimage package to create dynamic 25GB VHD images (static
VHD images are already supported by LinuxKit).
Signed-off-by: Dave Freitag <dcfreita@us.ibm.com>
This ovmf package is part of the community repository. We don't
want to "pollute" the Alpine base with it. Luckily it's juts a single
file which we can install and then copy to the base image.
The package is needed for qemu EFI boot.
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
While not used anywhere, adding it to the based makes it easy
to add temporarily add it to init (or elsewhere) for debugging.
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
The Dockerfile is now an input to the contents of the base image and
needs to be included in the hash calculation.
Also, make the Makefile, Dockerfile and pacakges file a dependency.
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
We use the "official" Alpine based Docker image and extract
the binary and libraries from it and add to the base. Compiling
it from source would require a Haskell setup...
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
The added packages are necessary to create a base Alpine
container image and for converting more packages.
Update the versions file to the latest versions
Also make the HUB org/registry build time configurable.
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
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.
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
It is not longer used by any package. Some projects
still use it and I haven't updated their builds but they
should continue to work.
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
Directly install the required packages from the Alpine base
image to compile the toybox-media package.
Also use the git tree hash for the package hash while at it.
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
Use the alpine base image and install the tools to compile
tini manually. This removes the dependency on c-compile.
Also use the git tree hash for the package hash while at it.
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
This means that we limit to one place where we use network access
in building, and in future all other package builds can be deterministic.
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
Previously we hardcoded `bzImage` which is not used for all
use cases or architectures.
fix#1630
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
Updated go-compile to be able to compile remotely. Note I
did not update the oter users of go-compile as it does not affect
them.
Update `go get` instructions to fetch new one, or `make && make install`
will still work.
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
This was missed when things were renamed.
The intention with this code was (apparently) to provide a (pseudo)unique
hostname in the case where something more specific was not provided (e.g. by
DHCP). Make this a little clearer by using '(none)' rather than 'linuxkit' as
the default, in the normal case this will be overwritten by something more
specific and if it isn't we will change it to something somewhat unique derived
from the MAC address (as before). nb: '(none)' is already used by Debian so I
think it is a safe choice as the sentinel value.
The use of both CONFIG_DEFAULT_HOSTNAME and the explicit /etc/hostname from
mkimage.sh is likely to be redundant in some cases, but neither seems to
completely cover all cases so keep both.
Signed-off-by: Ian Campbell <ian.campbell@docker.com>
Previously the "tini" contained the entire build. Using the
multi-stage build creates a new "tini" base image, which only
contains the "/bin/tini". This image can be used as the base
image for packages requiring "tini".
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
Previously, the cmdline file was never sent in the build context which
caused the script to pick the default options.
Also, when mulitple options are specified (not the default) the right
escaping needs to be used.
Signed-off-by: Thomas Gazagnaire <thomas@gazagnaire.org>
This flags allows passing additional ldflags to the build.
It is primarily there to pass -C arguments to specify values
of variables at compile time.
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
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>
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>
mkfs.vfat prints output (even without the -v option) which ends up
in front of the ISO, which is cat'ed to stdout. This made the generated
ISO unbootable. Redirect stdout of mkfs.vfat to /dev/null.
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
Guestfs is not really a base package and is only used
byt other images in the ./tools directory. Move it there.
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
- The tools directory ideally should not contain source code
- Removes double vendoring of packagages
- Makes it easer to hook the build into the top-level Makefile
Eventually, the plugin should be moved to the infrakit repo.
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
- 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>
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>
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>
This does not yet move the `make test` options in the Makefile, will
probably move those too later.
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
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>
- 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>
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>
LTP is compiled in on debian container and the binaries
then copied into another container, which is pushed to hub.
LTP does not compile on Alpine as it uses glibc specific
pthread extensions.
I tried to link LTP statically to not require a glibc based
base image but that failed too.
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
Passing accel=kvm:tcg causes it to try KVM first if available with a fallback
to TCG (emulated/JIT mode) if it is not available. With this the boot logs gain:
+Hypervisor detected: KVM
and also
-Booting paravirtualized kernel on bare hardware
+Booting paravirtualized kernel on KVM
Among various other noise.
If I rename my host /dev/kvm then this is reversed, although with the following
message:
Could not access KVM kernel module: No such file or directory
failed to initialize KVM: No such file or directory
Back to tcg accelerator.
Q35 is a more modern emulated platform based on the ICH9 host chipset rather
than the default "pc" I440FX (Pentium Pro / Pentium II era) emulation. See
http://wiki.qemu-project.org/Features/Q35 for more info. Switching to Q35 is
not a requirement for enabling KVM but seemed like a reasonable change.
Signed-off-by: Ian Campbell <ian.campbell@docker.com>
- 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>
os.FindProcess() does not return an error when then process does not
exist. It even returns a dummy process object.
Use the go-ps package to find out if the hyperkit process is actually
running.
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
the `moby` tool uses a prefix for the build output. Specify the prefix
(and optional path) in the `Moby` property in the JSON instead of assuming
a different path for each initrd/kernel.
Also, adopt the new name for the kernel image (vmlinuz64 -> <prefix>-bzImage).
This should make it simpler to boot up hyperkit with Moby images
build from by the moby tool.
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
- 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>
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>
Don't return if the process does not exist. Instead proceed and delete
the state directory.
This allows us to use the Destroy() method elsewhere to clean up the state.
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
Instead pass the directory where to find initrd/vmlinuz via the
"Moby" entry in the instance JSON config.
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
This change now allows setting the Disk size, memory, and number of CPUs
for an instance via the JSON config file.
We now also write the hyperkit command line to the VM directory.
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
This is the first cut of a InfraKit instance plugin which
primarily allows one to manage Moby instances (though, other Linux's
may work too).
It's very rough on the edges and needs work and update to handle
templates and better configuration etc.
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
Use aws cli to pull docker engine binaries from s3 bucket. Conditional and
happens if DOCKER_BIN_URL begins with 's3://'
Example usage:
```
export AWS_ACCESS_KEY_ID=key
export AWS_SECRET_ACCESS_KEY=secret
make DOCKER_BIN_URL=s3://path-to-engine-binaries
```
Signed-off-by: Robb Kistler <robb.kistler@docker.com>
Signed-off-by: Robb Kistler <robb.kistler@docker.com>
This includes most things except the containerd and runc builds
which I will do next time I update them.
Note that all golang:alpine images now for 1.8 are ALpine 3.5 based.
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
- `CONFIG_BUG_ON_DATA_CORRUPTION` is a 4.10 kernel only flag, so gate this.
- some config was duplicated on gated and normal config
- some 4.4 issues with the new config
Signed-off-by: Justin Cormack <justin.cormack@docker.com>