Commit Graph

417 Commits

Author SHA1 Message Date
Ian Campbell
6ee21a37c6 alpine: Pull in go (1.9) from Edge
This is a requirement of containerd.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-10-12 15:32:15 +00:00
Ian Campbell
1d030172bf Merge pull request #2600 from ijc/containerd-v1.0.0-beta.2
Bump to containerd v1.0.0-beta.2
2017-10-12 16:19:01 +01:00
Ian Campbell
19a02ef28c alpine: bump to containerd v1.0.0-beta.2
Note that a237b51511 ("Bump alpine base across the board.") inadvertently
corrupted `tools/alpine/versions.aarch64` (by updating it to the amd64 hash),
this commit corrects this as part of the rebuild.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-10-12 12:51:20 +01:00
Justin Cormack
995bde5a54 Merge pull request #2558 from deitch/raw-bios
Add support to make minimal raw bios images
2017-10-12 11:24:14 +01:00
Justin Cormack
3b07a9e793 Merge pull request #2540 from deitch/raw-efi
Add support to make raw efi images
2017-10-12 11:23:32 +01:00
Avi Deitcher
8f3e4e419d Add support to make raw efi images; simplify raw bios build
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2017-10-10 21:00:53 +03:00
Avi Deitcher
fb5383a25e simplify raw bios build
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2017-10-10 20:59:48 +03:00
Ian Campbell
d055ab31d8 tools: mkimage-*: disable content trust
Signing is not setup for these repositories. It seems they haven't been updated
since before trust was added since their previous Makefile metadata (which was
translated in build.yml) did not contain `NOTRUST=1`.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-10-10 10:13:15 +01:00
Ian Campbell
a237b51511 Bump alpine base across the board.
By running:

    ./scripts/update-component-sha.sh --image linuxkit/alpine ad35b6ddbc70faa07e59a9d7dee7707c08122e8d

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-10-10 09:55:45 +01:00
Ian Campbell
206fc78a6a Update alpine package
Signed-off-by: Ian Campbell <ijc@docker.com>
2017-10-10 08:54:44 +00:00
Ian Campbell
13d11f49ba Rename "tag*" Makefile targets to "build*"
This better matches the `linuxkit pkg build` nomenclature.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-10-09 16:48:48 +01:00
Ian Campbell
624e7c82f1 Convert most of tools/* to linuxkit pkg build
tools/alpine and tools/guestfs are omitted since they do not currently use
pkg/package.mk and do their own thing. Slightly hacky arrangements are made for
these. Note that previously they were only recursed into for their default
target (push) and that behaviour is retained.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-10-09 16:20:25 +01:00
Ian Campbell
f7c50156c5 tools: pull linuxkit/guestfs by digest only (not digest+tag)
Current versions of Docker complain:

    Sending build context to Docker daemon   5.12kB
    Step 1/4 : FROM linuxkit/guestfs@sha256:62e810869e83dabe04af7ac8fcd81d9f177d986a3424dcb9c4eb5439993c962f
    ...
    Successfully tagged linuxkit/mkimage-gcp:736880776838c8f41c081276d9c017ae6adbf1bb-amd64
    Tagging linuxkit/guestfs@sha256:62e810869e83dabe04af7ac8fcd81d9f177d986a3424dcb9c4eb5439993c962f as linuxkit/guestfs:aecc40bf84ce4f4238e06934c46d7cc570a39eed@sha256:62e810869e83dabe04af7ac8fcd81d9f177d986a3424dcb9c4eb5439993c962f
    refusing to create a tag with a digest reference
    ../../pkg/package.mk:82: recipe for target 'tag-y' failed

Just use the digest for now. Perhaps someone will have time to fixup this build
properly at some point.

Make the same change to test/pkg/ltp.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-10-09 16:20:10 +01:00
Ian Campbell
ca70b7b6af Update pkg/Makefile and test/pkg/Makefile based on tools/Makefile
Using explicit targets is cleaner and easier to follow.

Also add `forcepush` to pkg and test/pkg and make `push` explicit.

The `dirs` phony was non-existent in all three cases. Likewise `$(DIR)` wasn't
used in that way in pkg or test/pkg and is nolonger used in that way in tools.

Finally, `clean` was bogus in all cases (tools cleaned a thing which never
exists and pkg and test/pkg were a syntax error).

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-10-09 16:20:08 +01:00
Rolf Neugebauer
cac4168e26 tools/alpine: Add nfs-utils
New package is at: linuxkit/alpine:3fb44354a34b05134fbf585a00217cd2f8c8f0bf

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-10-06 13:32:45 +00:00
Rolf Neugebauer
61a1b9774c tools/alpine: Explicitly add blkid
On x86_64, the blkid package gets installed as a dependency, but
not on arm64. Explicitly add it as the new format package depends
on it.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-10-02 17:35:26 +00:00
Rolf Neugebauer
eafdbbd0fe tools/alpine: Add cifs-utils
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-10-02 13:22:30 +00:00
Rolf Neugebauer
21e26dcb46 tools/alpine: Add wireless-tools and wpa_supplicant
available as: linuxkit/alpine:a94acee63dc1d0bd5cd5006d66514f62373650f2

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-09-27 10:20:34 +00:00
Ian Campbell
fb94b23a93 alpine: rebuild
Signed-off-by: Ian Campbell <ijc@docker.com>
2017-09-25 12:29:10 +00:00
Ian Campbell
7bd1ca47b0 alpine: Add packages which are build dependencies of Kubernetes
Currently projects/kubernetes pulls in the binaries, adding these dependencies
will allow us to build them as part of our packaging process.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-09-25 12:17:02 +01:00
Ian Campbell
9ddcdaba56 alpine: bump to containerd v1.0.0-beta.1
Signed-off-by: Ian Campbell <ijc@docker.com>
2017-09-25 12:16:23 +01:00
Justin Cormack
c8f5d16a25 Merge pull request #2524 from arm64b/mkimage-efi-iso
mkimage: Support iso-efi generation for both arm64 and amd64
2017-09-24 09:03:53 -07:00
Dennis Chen
fa1829529d tools: Support iso-efi generation for both arm64 and amd64
This patch uses coreos grub2 instead of the built-in gummiboot
tool with Alpine distribution.

Coreos grub2 has the security feature such as TPM and kernel
verification, so we can setup a trust chain when loading
modules with grub2.

GNU grub2[1] also has the plan to add those security related
features, they have a 'verifiers' branch to do that, but
there're some build issue need to fix,so this patch use
coreos as an alternative.

This patch is used to address the #2359 #2375.

Thanks Avi Deitcher <avi@deitcher.net> for the contribution
to build the GRUB2 from ubuntu 16.04 to alpine base image.

Change Log:

1.Address the comments raised by @rn
2.Change the '/dev/vda' as the device name point by kernel command
  line 'root=' on arm64, '/dev/sr0' on amd64. As next plan, we can adapt
  a more flexible method to get the dev name of the CDROM.
3.Switch the base image to build grub2 from ubuntu 16.04 to alpine.
4.'linux' as the grub2 menu entry on arm64, while 'linuxefi' on amd64.

[1] https://git.savannah.gnu.org/git/grub.git

Signed-off-by: Dennis Chen <dennis.chen@arm.com>
2017-09-24 14:06:19 +00:00
Justin Cormack
a48a6b3e97 Build containerd in Alpine image
This makes it easier to add the containerd testing tools like
`containerd-stress` to test packages, for example, and also at
some point move `ctr` out of the base image as it can be installed
from the alpine image.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-09-20 21:16:54 +00:00
Ian Campbell
dea2e1df66 alpine: add coreutils
Signed-off-by: Ian Campbell <ijc@docker.com>
2017-09-20 14:22:55 +00:00
Rolf Neugebauer
b971db8a4b tools/alpine: Update alpine base image
In particular this updates the wireguard tools to a newer version.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-09-20 10:43:55 +00:00
Ian Campbell
b736afeee3 alpine: bump to containerd v1.0.0-beta.0
Signed-off-by: Ian Campbell <ijc@docker.com>
2017-09-07 17:28:38 +00:00
Rolf Neugebauer
1d33b90530 tools/alpine: Add iSCSI and related tools to base
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-09-04 17:58:16 +01:00
Rolf Neugebauer
db6e8bae35 tools: Add openssl, attr-dev, and libtirpc-dev to the alpine base image
The first is needed by the okernel project and last two to run
configure on the zfs kernel modules.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-08-31 15:54:12 +00:00
Ian Campbell
6d878dd65f alpine: bump to containerd v1.0.0-alpha6
Signed-off-by: Ian Campbell <ijc@docker.com>
2017-08-29 00:39:20 +01:00
Justin Cormack
90f905a799 Move containerd clone to tools/alpine
As discussed before, as we use this in three places, cloning in
base makes more sense.

Update base image.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-08-21 15:16:09 +01:00
Justin Cormack
92d31d733d Add ebtables, socat, libc6-compat to alpine base
These are needed by Kubernetes which is currently not using the standard abse image.

Also sort it.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-08-21 13:34:02 +01:00
Rolf Neugebauer
944b6a5816 tools/alpine: Add ethtool
resolves #2419

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-08-16 00:58:42 +01:00
Rolf Neugebauer
795ca7d0e4 tools/alpine: Update base image
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-08-15 11:11:30 +01:00
Avi Deitcher
40aee08ddb Add sgdisk package to linuxkit/alpine
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2017-08-14 18:30:30 +02:00
Ian Campbell
da6cbf74f3 alpine: Update to containerd v1.0.0-alpha4 base.
Signed-off-by: Ian Campbell <ijc@docker.com>
2017-08-11 16:13:23 +01:00
Justin Cormack
3321e713de Merge pull request #2363 from justincormack/efi-tar
Put full filesystem on EFI ISO
2017-08-07 19:10:39 +01:00
Ian Campbell
bfd9499795 alpine: bump to containerd v1.0.0-alpha3
Signed-off-by: Ian Campbell <ijc@docker.com>
2017-08-07 11:39:09 +01:00
Justin Cormack
fdc4eb7c32 Put full filesystem on EFI ISO
In line with BIOS ISO changes previously.

Remove boot options, user can add if required, they made boot very slow.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-08-04 21:04:37 +01:00
Rolf Neugebauer
473d544996 tools: Update remaining tools to the multi-arch base
linuxkit/mkimage-iso-bios did not work
on aarch64 (no syslinux) and will error.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-08-03 17:36:22 +01:00
Rolf Neugebauer
6adde26d62 tools/go-compile: Convert to multi-arch
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-08-03 17:36:22 +01:00
Rolf Neugebauer
6d4162343a scripts: Add a script to push and sign manifests
Also adjust the 'linuxkit/alpine' script to follow the
same pattern.

The new version of the script extract username/password from
the credential helper (or docker) and build and 'expect'
script to feed the info to 'notary'.

They can be invoked by:
DOCKER_CONTENT_TRUST_REPOSITORY_PASSPHRASE="phrase" ./push-manifest.sh ...

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-08-03 17:36:21 +01:00
Justin Cormack
570d706486 Merge pull request #2339 from justincormack/iso-files
Unpack filesystem for BIOS ISO
2017-08-02 15:47:59 +01:00
Justin Cormack
2b045f59fe Unpack filesystem for BIOS ISO
Now that LinuxKit works on a truly immutable filesystem, for an
ISO it makes sense to use the ISO filesystem rather than using
an initrd. Only major difference is you may need to specify the
device for the root filesystem in the kernel command line, but
we set a sane default of `/dev/sr0` if unspecified.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-08-02 13:28:35 +01:00
Rolf Neugebauer
fb6079b1a4 tools/alpine: Convert the alpine base image to a multi-arch image
- append a architecture specific suffix (-amd64, -arm64) to the
  image
- add a script which looks up the hashes from the 'versions' file
  and creates a multi-arch manifest
- the manifest is pushed to hub and signed with notary

The new linuxkit/alpine multi-arch image is available with the
x86_64 hash without the '-amd64' suffix.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-08-01 16:46:41 +01:00
Justin Cormack
17f5da9fea Provide way for programs to use CGO with go-compile script if they need to
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-07-31 16:11:07 +01:00
Ian Campbell
886870c935 alpine: Use C locale to sort the versions file.
This should reduce instability due to different people's environment. This
undoes the reordering done by "alpine: Update to containerd v1.0.0-alpha2",
leaving just the hash update (as expected).

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-07-27 12:14:36 +01:00
Ian Campbell
c8164c0a6e alpine: Update to containerd v1.0.0-alpha2
Signed-off-by: Ian Campbell <ijc@docker.com>
2017-07-27 11:07:03 +01:00
Justin Cormack
bafeac62ec Merge pull request #2301 from rn/base-ovmf
Various OVMF related fixes
2017-07-27 10:25:24 +01:00
Rolf Neugebauer
930c9c21df tools/qemu: Install ovmf for x86
The previous commit moved ovmf to the packages instead
of stashing it on the filesystem. This requires the
package to be installed here.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-07-26 18:14:28 +01:00
Rolf Neugebauer
bf5a461ce5 tools/alpine: Add OVMF to the mirror and not the image
We add the 'ovmf' to the mirror instead of installing
it in the rootfs. This way we record the version we are
using.

We already pull a few images (go, tini) from community
so may as well pull ovmf directly via 'packages.x86_64'.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-07-26 18:14:28 +01:00
Ian Campbell
5217b9973b alpine: Reminder to bump the containerd test when bumping containerd
Signed-off-by: Ian Campbell <ijc@docker.com>
2017-07-26 17:27:11 +01:00
Ian Campbell
df19ad752a tools/mkimage-iso-*: Transition to alpine base + package.mk
Signed-off-by: Ian Campbell <ijc@docker.com>
2017-07-26 14:47:42 +01:00
Ian Campbell
9f7917e543 tools: Update consumers of linuxkit/guestfs to package.mk build
Also update the base image to the latest.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-07-26 14:47:42 +01:00
Ian Campbell
ac3103236e toos/guestfs: Enable content trust globally
This makes the need to pull $(BASE) redundant.

Rebuild resulted in linuxkit/guestfs:aecc40bf84ce4f4238e06934c46d7cc570a39eed@sha256:62e810869e83dabe04af7ac8fcd81d9f177d986a3424dcb9c4eb5439993c962f

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-07-26 14:47:42 +01:00
Ian Campbell
b472f79dbf tools/guestfs: Use build --iidfile
Modelled after tools/alpine's build.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-07-26 14:47:42 +01:00
Rolf Neugebauer
4de8abb997 tools/alpine: Updated and sign new alpine base image for arm64
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-07-25 15:49:58 +00:00
Rolf Neugebauer
fe9e8be2c6 tools/alpine: Make sure we use content trust for linuxkit/alpine
We should always pull and push linuxkit/alpine with content trust
irrespective of architecture, unless explicitly disabled.

Currently, we have to dance around various other issues on arm64,
which are now documented in the Makefile.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-07-25 16:37:46 +01:00
Rolf Neugebauer
840686052a tools/alpine: Resync alpine base image
Somewhere between the various updates yesterday the hash in
'versions.x86_64' went wrong and there is no image with hash
available on hub.

This commit updates the alpine base to the latest version and
thus rectifies the issue

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-07-25 11:46:07 +01:00
Rolf Neugebauer
f16018ea87 Merge pull request #2282 from rn/arm-base
tools/alpine: Update arm64 base image
2017-07-24 16:55:56 +01:00
Rolf Neugebauer
1405019a54 tools/alpine: Update arm64 base image
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-07-24 14:57:58 +00:00
Ian Campbell
4cb43060e4 alpine: Drop trailing whitespace in Dockerfile.
Signed-off-by: Ian Campbell <ijc@docker.com>
2017-07-24 12:14:21 +01:00
Ian Campbell
e015aff65a alpine: Use docker build --iidfile
This was added in 17.06 and allows us to avoid using `$(BASE):build` which is
not safe against parallel builds etc.

Having done this restructure the build to not always delete the built container
and to separate out the `hash` and `version` file rules so that they can be
included in both the `tag` and `push` targets.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-07-24 12:13:58 +01:00
Dennis Chen
cc14a74276 tools/alpine: multi-arch support for the base alpine image
Alpine is the base docker image for the LinuxKit, but currently
it only supports amd64 architecture. This patch is try to unify
the alpine tool docker image build process order to suport other
architectures, such as AArch64, by using '--build-arg' to override
the alpine base image specified by 'FROM' in the Dockerfile.

Also this patch splits the standalone packages into 2 parts:
one is common for all archs, another is arch-specific.

Signed-off-by: Dennis Chen <dennis.chen@arm.com>
2017-07-24 10:09:23 +00:00
Avi Deitcher
74f5af924c Add development tools to linuxkit/alpine mirror
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2017-07-24 11:00:57 +03:00
Riyaz Faizullabhoy
ddad2443d0 Merge pull request #2268 from riyazdf/update-alpine-base-versions
tools/alpine: update version
2017-07-20 17:08:53 -07:00
Riyaz Faizullabhoy
e2289984ac tools/alpine: update version
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2017-07-20 14:39:23 -07:00
Jason A. Donenfeld
a837a6fc65 wireguard: add tools to alpine as package not into filesystem
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-07-20 22:01:05 +02:00
Jason A. Donenfeld
a09a2a4b22 wireguard: integrate tools into alpine
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-07-20 16:51:53 +02:00
Ian Campbell
b3db1a887c Update to containerd v1.0.0-alpha1
This is actually containerd#1141 rebased onto v1.0.0-alpha1.

The `dist` command has been integreated into `ctr` and so is removed, including
from the getty and sshd bind mounts and the test which uses it is updated..

There is no change to the version of runc vendored by containerd, so this is
unchanged.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-07-20 14:10:51 +01:00
Ian Campbell
ddb9efbffb alpine: Include xfsprogs-extra
Signed-off-by: Ian Campbell <ijc@docker.com>
2017-07-20 14:10:51 +01:00
Ian Campbell
a24819f2e5 Update to latest alpine base for go-compile
I noticed that running the runes in docs/vendoring.md made a bunch of files
which are omitted by modern vndr come back, presumably due to the old version
of vndr referenced there. So update the go-compile package to the current
version everywhere.

Also correct the use of `make` variable syntax (`$(PWD)`) where shell syntax
command substitution for `pwd` was desired.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-07-19 14:40:24 +01:00
Justin Cormack
c6a0423309 Merge pull request #2223 from arm64b/qemu-dockerfile-multiarch
ARM64: Multi-arch support in qemu Dockerfile
2017-07-17 10:49:17 +01:00
Dennis Chen
6791ad986c ARM64: Multi-arch support in qemu Dockerfile
Update the qemu Dockerfile to support both amd64 and arm64.

Signed-off-by: Dennis Chen <dennis.chen@arm.com>
2017-07-17 07:28:48 +00:00
Dennis Chen
4cdff71e05 tools: Fix the order sequence issue in Makefile
tools/qemu and toos/go-compile define the IMAGE after the
package.mk, which result in below error if 'make ORG=other_org':
...
invalid argument "other_org/:2c6d9e1d9c52167f4f2b7a8fd235eda318175c99"for t: invalid reference format
See 'docker build --help'.
../../pkg/package.mk:47: recipe for target 'tag' failed
make: *** [tag] Error 125

This because '../../pkg/package.mk' need to use IMAGE variable first.

Signed-off-by: Dennis Chen <dennis.chen@arm.com>
2017-07-17 07:03:27 +00:00
Liqdfire
457f9a61c6 fix BASE in makefile to match Dockerfile
Signed-off-by: Liqdfire <liqdfire@gmail.com>
2017-07-14 14:00:43 -04:00
Ian Campbell
28905c57cc alpine: Record image has in versions file
Otherwise the only record is if the pusher happens to remember to put it in the
commit message (tollerable) or the github PR (not great).

Also add the same show-tag target as `pkg/package.mk` supports, although with a
very different implementation.

The actual hash is unchanged from the previous commit.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-07-14 12:41:11 +01:00
Ian Campbell
00a2f2ac8c alpine: stash the original /etc/apk/repositories for downstream use
If a user of linuxkit/alpine wants to produce an image with apk in it then it
is useful for them to have the original upstream repository list.

The new hash is linuxkit/alpine:3744607156e6b67e3e7d083b15be9e7722215e73

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-07-14 12:37:38 +01:00
Ian Campbell
902e6182b0 Temporarily use https://github.com/containerd/containerd/pull/1141
We expect this (or something very similar) to be merged soon, it fixes #2131 so
moving ahead now.

The new alpine mirror is linuxkit/alpine:6832775a7e861ee2d7842e157688ece52d007142

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-07-13 10:42:55 +01:00
Ian Campbell
c5634c4650 Define CONTAINERD_REPO alongside CONTAINERD_COMMIT in tools/alpine
This will make it simpler to temporarily in PRs which are not yet merged (but
are expected to be soon).

Tools alpine is not rebuilt here since we are going to do just that in the next
commit.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-07-13 10:38:27 +01:00
Ian Campbell
aa3db640af Update alpine base to containerd v1.0.0-alpha0
New hash is linuxkit/alpine:8bb8664eec04e02a8a131c53aa7d5d94119270ef

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2017-07-13 10:32:00 +01:00
Justin Cormack
30128d894e Remove shellcheck from base
We should use this from a container at top level instead; it makes it
much harder to port to other architectures if we have to have this as
it is written in Haskell making a multi arch build much harder.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-07-11 22:15:27 +01:00
Rolf Neugebauer
03b78d5153 tools: Add a few more packages to the Alpine base image
- iproute2 provides a more complete suite of 'ip' utilities than
  the busybox implementation. Useful, for debugging.
- iperf3 for network testing
- tcpdump for network debugging
- expect is used in some tests. Adding it to the base image should
  make it easier to create a LinuxKit image to self-host CI.

The new version of the base package is:
linuxkit/alpine:3d57ded3edd54e616210cf0c17e3bc15eed9d03a

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-07-08 13:48:30 +01:00
Magnus Skjegstad
1e3c430a33 alpine: update versions
Signed-off-by: Magnus Skjegstad <magnus@skjegstad.com>
2017-07-05 22:38:24 +02:00
Magnus Skjegstad
7c063429f1 alpine: add busybox-initscripts
Add busybox-initscripts as it contains /etc/acpi needed to run
/sbin/acpid.

Signed-off-by: Magnus Skjegstad <magnus@skjegstad.com>
2017-07-05 20:48:41 +02:00
Dave Tucker
5bf63f4cc5 tools: Bring back mkimage-gcp
This was incorrectly removed in e782a469d5

Signed-off-by: Dave Tucker <dt@docker.com>
2017-07-03 17:09:55 +01:00
Ian Campbell
d5535ea3e4 tools/qemu: Use common pkg/package.mk to drive Makefile
Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2017-07-03 10:27:31 +01:00
Ian Campbell
7534d4c926 tool/go-compile: Use common pkg/package.mk to drive Makefile
Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2017-07-03 10:27:31 +01:00
Vincent Demeester
a315e0b681 Fix DIRS find command to work on more system
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2017-07-03 10:27:31 +01:00
Rolf Neugebauer
699a864302 pkg: Update to new Alpine base
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-07-01 18:11:45 +01:00
Rolf Neugebauer
3019a222e8 tools: Update alpine base package
Since we have to push all new packages due to 5a225b9d
("Makefile: Fix bug where network was not disabled") we
may as well update the Alpine base to the latest.

The new tag is: 9bcf61f605ef0ce36cc94d59b8eac307862de6e1

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-07-01 18:11:45 +01:00
Rolf Neugebauer
0b3954257f tools: Fix containerd commit environment
Commit 4699f80e ("test: add test-containerd") added
the containerd commit hash to the alpine base image.
Unfortunately, setting it as ARG does not work and it
needs to be set with ENV for other builds to pick it up.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-07-01 18:11:45 +01:00
Tycho Andersen
31f356fe0e tools/alpine: add abuild and some audit deps
We'll use abuild in the next commit for building auditd from source.

Also add these audit deps:

* swig
* python3
* libcap-ng-dev

Signed-off-by: Tycho Andersen <tycho@docker.com>
2017-06-28 09:10:00 -06:00
Rolf Neugebauer
73e5ea8f01 tools: Update the Alpine base image to the latest versions
A subsequent commit will update all packages, so we might as well
update all packages to the latest base.

The new hash is: linuxkit/alpine:c608d404c1cb36cce0c7d9303e30b52c9d81ccf0

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-06-27 17:43:57 +01:00
Ian Campbell
e880052d35 alpine: Add tzdata to mirror.
Moved qemu-img to keep list fully alphabetical.

Rebuild pushed as linuxkit/alpine:c96f56ef989ccb31fd115d25c1b90f05b992271d

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2017-06-26 11:51:27 +01:00
Riyaz Faizullabhoy
130800446a alpine: add zfs package
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2017-06-21 17:54:45 -07:00
Riyaz Faizullabhoy
6b5ef8c70e alpine: include gnupg package
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2017-06-21 17:49:51 -07:00
Akihiro Suda
4699f80ef7 test: add test-containerd
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-06-19 11:04:58 -07:00
Justin Cormack
4e35c74b07 Merge pull request #1955 from davefreitag/25g
Adding Dynamic VHD mkimage package
2017-06-16 11:03:50 -07:00
Rolf Neugebauer
1689dffe30 tools: Remove perf
It's not build as part of the kernel build.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-06-15 10:49:04 -07:00
Rolf Neugebauer
db78ab9879 tools: Remove kernel-compile. It's no longer used
projects are still using it, but it's still on hub so no
impact.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-06-15 10:39:32 -07:00
Rolf Neugebauer
3fbc39996a tools: Update alpine base and add a few more packages
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>
2017-06-15 10:39:32 -07:00
Justin Cormack
e782a469d5 Update moby tool and qemu fixes
- 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>
2017-06-05 16:34:26 +01:00
Dave Freitag
24ffb20cd8 Adding Dynamic VHD mkimage package
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>
2017-06-01 16:16:12 -05:00
Rolf Neugebauer
fa9151cc00 tools: Build qemu package from the Alpine base
Also use the git tree hash as the hash.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-05-30 17:15:13 +01:00
Rolf Neugebauer
63d5031035 tools: Add OVMF BIOS firmware to the Alpine base
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>
2017-05-30 17:15:13 +01:00
Rolf Neugebauer
0d718fed40 tools: Use the Alpine base to build the go-compile image
Also, convert to use a git tree hash.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-05-30 17:15:13 +01:00
Rolf Neugebauer
9e39f07dc7 tools: Add strace to the Alpine base
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>
2017-05-27 11:47:37 +01:00
Rolf Neugebauer
ac5122ced7 tools: Add Dockerfile to the Alpine base image to calculate the hash
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>
2017-05-26 15:50:54 +01:00
Rolf Neugebauer
aecad407c5 tools: Add shellcheck to the Alpine base
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>
2017-05-26 15:50:54 +01:00
Rolf Neugebauer
977a2eb0ff tools: Switch the Alpine base image to Alpine 3.6
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-05-26 15:50:54 +01:00
Riyaz Faizullabhoy
05f1c282d5 Update images that have been newly setup for signing to use content trust on push
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2017-05-25 11:06:08 -07:00
Rolf Neugebauer
a73be1d7ef tools: Add VM integration agents to the Alpine base
Add the Qemu, Hyper-V and VMware VM tools to the base

Also update the versions file.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-05-24 09:35:37 +01:00
Justin Cormack
e3a4a88e73 Update alpine package
- minor cleanup
- remove cross compile support from go-compile script as not needed

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-05-20 10:59:31 +01:00
Justin Cormack
fc69bcf288 Partially fix Windows build with go-compile
Fix go-compile to not use buildmode pie for Windows.

See #1863

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-05-20 10:57:48 +01:00
Justin Cormack
78728c281d Add go-compile script to linuxkit/alpine
This means Go code can use the same base image, which now includes Go tooling.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-05-19 14:22:12 +01:00
Rolf Neugebauer
b2eacf0f6c tools: Remove toybox. It's no longer used by any active packages
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-05-18 18:55:22 +01:00
Rolf Neugebauer
d06ecc5f79 tools: Remove tini image
All users in ./pkg and ./test have been converted to use
tini from the alpine base image.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-05-18 18:55:22 +01:00
Rolf Neugebauer
98a99c6482 tools: Add packages to alpine base to create a base system
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>
2017-05-18 18:55:22 +01:00
Justin Cormack
fe4b6aaf5d Add image builder for compressed disk image
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>
2017-05-12 14:43:55 +01:00
Justin Cormack
f2fc503bb0 Add Go to linuxkit/alpine
Note this is currently Go 1.7.4 but should be updated soon to 1.8.1.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-05-08 22:03:02 +01:00
Rolf Neugebauer
2273a1c9a8 tools: Remove c-compile
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>
2017-05-08 16:46:47 +01:00
Rolf Neugebauer
ff45e154e9 tools: Remove c-compile from toybox-media
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>
2017-05-08 16:28:39 +01:00
Rolf Neugebauer
046afdda48 tools: Remove c-compile from tini
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>
2017-05-08 16:28:39 +01:00
Justin Cormack
8914ccc6da Include virtual packages in alpine mirror
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-05-08 14:20:27 +01:00
Justin Cormack
861c70c0e4 Merge pull request #1763 from justincormack/alpine-base
Use Alpine base image that includes packages
2017-05-03 16:55:54 +01:00
Justin Cormack
edfac0e8fb Add a base Alpine package that includes a package mirror
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>
2017-05-03 16:29:53 +01:00
Justin Cormack
fa90764b55 Remove unused mkimage-base
We have not used this for ages, we use Go code in `moby` tool to
do this now.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-05-03 14:27:05 +01:00
Justin Cormack
6155e8c8bc Change to use kernel not bzImage everywhere
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>
2017-04-28 16:24:15 +01:00
Justin Cormack
98dfe7ad55 Merge pull request #1721 from riyazdf/more-signing-targets
Signing targets for binfmt, rngd, compilers, toybox, tini
2017-04-27 18:53:49 +01:00
Riyaz Faizullabhoy
2c4c55859f Add separate sign-tag target, keep tool building offline
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2017-04-27 10:34:40 -07:00
Riyaz Faizullabhoy
38ad84bfbd pull base images with content trust for binfmt, rngd, tini, toybox-media
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2017-04-26 14:28:30 -07:00
Riyaz Faizullabhoy
72e7945ec6 Add signing targets for binfmt, c-compile, go-compile, rngd, tini, toybox-media
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2017-04-26 10:55:20 -07:00
Rolf Neugebauer
6240f73bd7 tools: Move and rename kernel-compile container
Move it to tools and renamed it to kernel-compile, similar to
c-compile and go-compile.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-26 14:53:15 +01:00
Rolf Neugebauer
115b09faad Merge pull request #1704 from ijc25/fix-unique-fallback-hostname
Switch fallback hostname to linuxkit-* from moby-*
2017-04-26 09:54:19 +01:00
Justin Cormack
252e32aac5 Remove the moby tool from this repo
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>
2017-04-25 14:53:32 +01:00
Ian Campbell
20cfa2af2c Switch fallback hostname to linuxkit-* from moby-*
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>
2017-04-25 14:09:38 +01:00
Rolf Neugebauer
60a12f1c52 tools: Move toybox to ./tools and use a multi-stage build
Also use c-compile to compile it

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-24 18:41:27 +01:00
Rolf Neugebauer
85bcee93dd tools: Move tini to ./tools and convert to multi-stage build
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>
2017-04-24 18:41:27 +01:00
Rolf Neugebauer
370f8e7eb0 tools: Add more utilities to c-compile
These utilities are needed to compile tini, rngd, and toybox.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-24 18:41:27 +01:00
Dave Tucker
0ba381c77a tools: Change qemu image for use with moby run
- Remove the qemu.sh entrypoint
- This means that any qemu command can be used (e.g qemu.img)

Signed-off-by: Dave Tucker <dt@docker.com>
2017-04-24 15:16:51 +01:00
Riyaz Faizullabhoy
31a8480878 Add ineffassign to go-compile, use tmp files to ensure proper failure
handling

Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2017-04-12 14:42:19 -07:00
Rolf Neugebauer
d14d462910 tools: Rename hub org to linuxkit
Rename various mention of moby while at it

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-12 21:28:17 +01:00
Dave Tucker
00edddac9a Add vndr to go-compile and add vendoring docs
This makes it easier to safely udpate the vendor directory

Signed-off-by: Dave Tucker <dt@docker.com>
2017-04-11 13:35:51 +01:00
Dave Tucker
bf7ab9f04c tools: rename mkimage-gce to mkimage-gcp
Also removes `mobyplatform` from the cmdline as this is no longer used

Signed-off-by: Dave Tucker <dt@docker.com>
2017-04-06 16:59:57 +01:00
Justin Cormack
40cc6d8110 Merge pull request #1517 from samoht/make-qemu
Really fix `make qemu`
2017-04-06 15:14:22 +01:00
Thomas Gazagnaire
7f0761c5f1 Really fix make qemu
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>
2017-04-06 16:05:35 +02:00
Rolf Neugebauer
f76f2b6654 tools: Add --ldflags to go-compile
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>
2017-04-06 10:55:18 +01:00
Justin Cormack
4d9bd63b1b Merge pull request #1439 from dave-tucker/uefi
Add a runner for UEFI ISOs
2017-04-04 10:52:32 +01:00
Justin Cormack
065af9707c 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
Justin Cormack
47e483fea3 Do not set ambient caps for now
Will make it explicit later.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-04-03 18:39:16 +01:00
Ian Campbell
709402d780 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
Dave Tucker
6726746484 Add a runner for UEFI ISOs
Fixes #480

Signed-off-by: Dave Tucker <dt@docker.com>
2017-04-03 14:13:37 +01:00
Rolf Neugebauer
be16cf67b4 tools: Fix make-efi script
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>
2017-04-01 16:22:35 +01:00
Rolf Neugebauer
b4a3e2e0da Merge pull request #1411 from rneugeba/cleanup
more repository cleanup
2017-03-29 16:52:32 +01:00
Rolf Neugebauer
557f039747 base: Move guestfs to tools.
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>
2017-03-29 16:37:59 +01:00
Rolf Neugebauer
2c49714ef9 projects: Move AWS bits to projects until they are usable again
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-03-29 16:28:21 +01:00
Rolf Neugebauer
6a29d153f5 infrakit: Move the hyperkit instance plugin into the source directory
- 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>
2017-03-25 13:02:45 +01:00
Justin Cormack
ab5cb52823 Update hyperkit Go bindings
Fixes location of hyperkit executable with recent builds of Docker for Mac

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-03-24 16:31:08 +00:00
Justin Cormack
eac7ab7db0 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
2be31831d8 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
6bba73ec0b 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
a75989f447 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
c76074ff66 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
Justin Cormack
7ca40d7801 We no longer directly convert to initrd, we use Go libraries for this
Removed unused tooling.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-03-21 11:47:16 +00:00
Justin Cormack
9976d6e31d 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
5746d3d2bf Move test related code to the test directory
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>
2017-03-20 16:14:06 +00:00
Justin Cormack
9208496d82 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
Rolf Neugebauer
dcb6f8e5f6 infrakit: Use the new HyperKit go package
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-03-18 20:38:02 +00:00
Rolf Neugebauer
a6dab6e6ca infrakit: Update vendored packages
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-03-18 19:29:33 +00:00
Justin Cormack
73e30a757f 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
b0ceaf2d0b Merge pull request #1306 from riyazdf/separate-container-logs
logs: separate daemon container logs into separate files
2017-03-15 14:22:41 +00:00
Justin Cormack
d72d5c6d0d 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
fb242fad9d tools: Calculate EFI ESP FAT FS size based on contents.
This requires switching to the dosfstools from alpine:edge since neither the
busybox nor alpine:3.5 dosfstools supports the -C option (in fact alpine:3.5
only has mkfs.fat and not mkfs.vfat).

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

Fixes #1304.

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2017-03-15 13:30:20 +00:00
Riyaz Faizullabhoy
8d3a7ff351 logs: separate daemon container logs into separate files
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2017-03-15 12:24:10 +00:00
Justin Cormack
6d72dcee5f Merge pull request #1301 from riyazdf/readonly-check-container
Read-only check container for testing, clean up error output
2017-03-15 11:15:53 +00:00
Riyaz Faizullabhoy
7c322c0e81 read-only check container for testing, clean up error output
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2017-03-14 17:08:07 +00:00
Rolf Neugebauer
3874a37824 kernel: Update YAML files with new kernel images
Use the 4.9.x (aka latest) in all files

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-03-14 10:54:44 +00:00
Rolf Neugebauer
76a02c15fc tools: Add YAML file for running LTP
LTP does need disk access, so this needs to be added once it
is supported again.

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

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

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

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-03-13 17:43:10 +00:00
Justin Cormack
1a80011a4c Merge pull request #1296 from ijc25/q35-and-kvm
qemu: Enable KVM support and switch to Q35
2017-03-13 15:55:16 +00:00
Ian Campbell
0dbb1e6e97 qemu: Enable KVM support and switch to Q35
Passing accel=kvm:tcg causes it to try KVM first if available with a fallback
to TCG (emulated/JIT mode) if it is not available. With this the boot logs gain:

+Hypervisor detected: KVM

and also

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

Among various other noise.

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

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

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

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2017-03-13 15:39:08 +00:00
Riyaz Faizullabhoy
5c1662b1c1 Remove unused test bits
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2017-03-13 12:06:24 +00:00
Justin Cormack
054c3b08a3 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
5c19da6fa3 Merge pull request #1277 from justincormack/vhd
Add VHD and GCE output formats
2017-03-10 16:13:23 +00:00
Justin Cormack
718d45bdf5 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
Rolf Neugebauer
562bc65dec infrakit: Attach ISO file to VM if it exists
The file can me mounted in the VM as /dev/sr0

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-03-10 14:55:23 +00:00
Rolf Neugebauer
cde6fb9309 infrakit: Write ISO file from instance init contents
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-03-10 14:24:18 +00:00
Justin Cormack
c7d1438128 Merge pull request #1264 from tych0/hoist-kernel-cmdline
Hoist kernel cmdline
2017-03-09 22:34:30 +00:00
Tycho Andersen
a383e6bb46 hoist kernel cmdline into moby.yaml
Signed-off-by: Tycho Andersen <tycho@docker.com>
2017-03-09 14:29:40 -08:00
Justin Cormack
57355aa813 Merge pull request #1271 from rneugeba/infra-up
infrakit: Fix detection of running proceses
2017-03-09 22:13:26 +00:00
Rolf Neugebauer
0f7807e48d infrakit: Fix detection of running proceses
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>
2017-03-09 22:08:44 +00:00
Tycho Andersen
8a3ae66f64 hoist kernel command line out of qemu docker image
we want to fiddle with this for selinux, and probably for other things too.

Signed-off-by: Tycho Andersen <tycho@docker.com>
2017-03-09 11:13:49 -08:00
Justin Cormack
154c3516b2 Strip Go files to make them a bit smaller
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-03-09 15:30:15 +00:00
Rolf Neugebauer
ba7a162603 infrakit: Use the moby tool naming convention to select moby builds
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>
2017-03-07 16:09:26 +00:00
Rolf Neugebauer
118309b03f Merge pull request #1255 from rneugeba/infra-docs
infrakit: Update docs
2017-03-07 15:58:56 +00:00
Rolf Neugebauer
198599912d infrakit: Update docs
While at it, also simplify the JSON file

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-03-07 15:03:03 +00:00
Justin Cormack
7d6de92700 More cleanup
- remove more editions code
- remove unused tool pad4
- add back whale to test output

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-03-07 13:05:53 +00:00
Justin Cormack
159202416c 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
e35c4c9b37 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
Rolf Neugebauer
1c3f4b4865 infrakit: Make Destroy() usable elsewhere
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>
2017-03-01 17:41:18 -08:00
Rolf Neugebauer
d1ad02e079 infrakit: Move default VM directory to .infrakit/hyperkit-vms
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-03-01 17:13:17 -08:00
Rolf Neugebauer
95fa38f879 infrakit: removed vm-lib from arguments
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>
2017-03-01 16:52:37 -08:00
Rolf Neugebauer
af2ee9e023 infrakit: Use template based instance configuratio
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>
2017-03-01 16:09:30 -08:00
Rolf Neugebauer
175daffe71 tools: Add initial HyperKit/Moby InfraKit instance plugin
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>
2017-02-28 18:51:31 -08:00
Robb Kistler
b2b585ac99 Allow docker engine to be pulled from s3 bucket
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>
2017-02-23 20:32:00 -08:00
Riyaz Faizullabhoy
447ee3b6c0 Merge pull request #1202 from justincormack/go-up
Update to Go 1.8
2017-02-17 09:19:53 -08:00
Riyaz Faizullabhoy
c643f19434 Merge pull request #1197 from justincormack/testup
Update kernel config tests
2017-02-17 09:19:44 -08:00
Justin Cormack
fe64819020 Update to Go 1.8
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>
2017-02-17 16:31:19 +00:00
Justin Cormack
74111017f6 Merge pull request #1201 from justincormack/newtools
Add new minimal init prototype and new tools
2017-02-17 15:56:42 +00:00
Justin Cormack
d29be01b0d Add new minimal init prototype and new tools
This is part of the new moby tool work to get a minimal system
up that can be expanded.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-02-17 15:31:00 +00:00
Justin Cormack
844c1c39df Update kernel config tests
- `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>
2017-02-17 14:52:32 +00:00
Riyaz Faizullabhoy
4daa3b5c88 Bump kernel config test and revert IA32_EMULATION
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2017-02-13 11:38:14 -08:00
Riyaz Faizullabhoy
25b2d47f1d Add page_poison=1 to boot args
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2017-02-13 10:16:46 -08:00
Justin Cormack
66c92081fc Update kernel config check for suggested values
This should be done with #1175

Config not updated as may still need changes

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-02-13 10:14:53 -08:00
Justin Cormack
9fe9e95349 Replace mkinitrd.sh with a tool to convert base image to initrd
Better split between content and tools.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-02-01 22:32:34 +00:00
Riyaz Faizullabhoy
d66bc2d501 Split base/ into base/ and tools/
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2017-01-31 09:52:30 -08:00