Commit Graph

220 Commits

Author SHA1 Message Date
Rolf Neugebauer
affa1c6b7d Update the uses of linuxkit/go-compile to the alpine:3.7 base
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-12-08 16:25:13 +00:00
Ian Campbell
13adecbc3e linuxkit: move version info to subpackage
Will avoid circular includes when I reference from pkglib too.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-12-01 13:55:43 +00:00
Dennis Chen
a4cc18622c Makefile: Fix binaries generation issue when 'docker build' failed
Currently we will always create a temp tar file even the 'docker run'
failed for some reason,e.g, the docker daemon doesn't run. As a result,
we'll get the 2nd error even we've fixed 'docker run' failure.

Signed-off-by: Dennis Chen <dennis.chen@arm.com>
2017-11-29 01:46:34 +00:00
Justin Cormack
b2a67710fa Remove bits that build moby tool from Makefile
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-11-20 23:49:27 +00:00
Justin Cormack
6cb919b489 Add support for creating cgroups in runtime section
Implements https://github.com/moby/tool/pull/181

Design for things like Kubernetes setup that requires some cgroups to
exist when the service starts but it is not running in these, other
services are, so there would be a race if they are not created in each.

Essentially it is just a sugared `mkdir` in all the cgroup dirs.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-11-17 14:12:41 +00:00
Ian Campbell
479e183c8a local-build: build a static + stripped binary by default
On Linux enable pie too.

Lastly, give the user control over the target name (e.g. to allow them to build
with a GOOS+GOARCH suffix).

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-11-07 10:17:44 +00:00
Ian Campbell
239a82901e Merge pull request #2609 from ijc/travis
experimenting with Travis
2017-11-01 12:17:18 +00:00
Avi Deitcher
bc791e60e7 Update docs and test cases to work with latest format versions
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2017-10-31 13:49:52 +02:00
Ian Campbell
abbda95d06 Updates for tools/* which are rebuilt with new alpine
Signed-off-by: Ian Campbell <ijc@docker.com>
2017-10-24 10:25:07 +01:00
Rolf Neugebauer
136dafe2c6 build: Update moby tool to latest
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-10-20 20:22:03 +01:00
Ian Campbell
4ce0e91035 local-check: fail build if gofmt detects differences
It seems to exit code 0 in all cases.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-10-13 14:32:20 +01:00
Ian Campbell
6a51e5f937 Update references to linuxkit/go-compile to latest.
Signed-off-by: Ian Campbell <ijc@docker.com>
2017-10-12 16:41:57 +01:00
Ian Campbell
a50bf40e09 Add fmt/lint/etc and test to local target
Signed-off-by: Ian Campbell <ijc@docker.com>
2017-10-12 10:47:32 +01:00
Ian Campbell
4df5d394e8 Bump yml
Done as follows:

    find -name build.yml | xargs dirname | while read d ; do
        t=$(linuxkit pkg show-tag $d)
        ./scripts/update-component-sha.sh --image ${t%:*} ${t#*:}
    done
    git commit -s test pkg tools blueprints examples projects/kubernetes projects/swarmd docs linuxkit.yml Makefile src

This explicitly excludes projects/* which I did not know whether to update.

Then:

    git reset --hard
    for i in init runc containerd ca-certificates sysctl dhcpcd getty rngd ; do
        o=$(git grep -h "\(image:\|-\) *linuxkit/$i:[0-9a-f]\{40\}" origin/master:linuxkit.yml | awk '// { print $2 }')
        n=$(linuxkit pkg show-tag pkg/$i)
        ./scripts/update-component-sha.sh "$o" "$n"
    done
    git commit --amend projects

This updates any projects which were using components with the same hash as the
top-level linuxkit.yml.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-10-10 13:23:45 +01: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
Justin Cormack
d0882b9674 Merge pull request #2571 from ijc/linuxkit-pkg
Implement package build, push and show-tag in linuxkit tool
2017-10-09 13:59:02 +01:00
Justin Cormack
61d1906e51 Update Moby
Several fixes and updates since last update.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-10-09 12:30:47 +01:00
Ian Campbell
3141ca0bef Embed scripts/push-manifest.sh into linuxkit tool
This is a bit gross, but hopefully this script will be written in go sooner
rather than later and in the meantime this avoids the need to install yet
another tool on user's systems (and get it into brew etc).

Checkin the result of `go:generate` for now. Once there are no more users of
push-manifest.sh it can be moved alongside the go code (if it hasn't been
rewritten in go along the way).

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-10-06 14:02:51 +01:00
Ian Campbell
ba60937754 Implement package build, push and show-tag in linuxkit tool
This implements the proposal in #2564 and converts a handful of representative
or especially interesting (from a build PoV) packages to use it.

For now those pkg/* affected get a stub-`Makefile`, once all packages are
converted then `pkg/Makefile` can be adjusted and those stubs can be removed.

For now only `pkg/package.mk`'s functionality is implemented. In particular:

- `push-manifest.sh` remains a separate script, to enable calling it on systems
  with just the LinuxKit tools installed arrange to install it under a less
  generic name.
- `kernel` and `tools/alpine` do not use `pkg/package.mk` and those cases are
  not yet fully considered/covered.

I have updated the documentation assuming that the existing uses of
`pkg/package.mk` will be removed quite soon in a follow up PR rather than
trying to document the situation which results after just this commit.

Due to `cmd/linuxkit` now gaining a library the build needs adjusting slightly to
allow both `make bin/linuxkit` and `go build` to work.

`go vet` has forced me to write some rather asinine comments for things that
are rather obvious from the name.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-10-06 12:59:25 +01:00
Justin Cormack
20109fd00f Update moby tool to latest version
Includes update EFI ISO generation.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-09-25 11:12:22 -07:00
Rolf Neugebauer
27839280f7 build: Update rtf to the latest version
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-09-18 13:51:16 +01:00
Justin Cormack
91207540e4 Change "output" to "format" in moby tool
This is less confusing as there is also an output option to set the file.

See https://github.com/moby/tool/pull/146

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-09-01 23:52:25 +01:00
Justin Cormack
24e10defc5 Update moby tool
This has corresponding changes to support runtime mount changes.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-08-23 16:44:51 +01:00
Justin Cormack
86c1d9fb46 Add moby tool version with runtime support
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-08-18 15:51:57 +01:00
Justin Cormack
b0324808ae Update moby commit
fix #2401

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-08-14 20:44:36 +01:00
Justin Cormack
d64db8d2a7 Update Moby tool to use this image for unpacked EFI ISO
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-08-07 17:46:12 +01:00
Rolf Neugebauer
ad09ebd493 build: Use master of manifest-tool
The PR to enable notary signing has been merged. Also update
documentation as `got get` should now also work.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-08-04 18:34:56 +01:00
Rolf Neugebauer
b0df2c94ae build: Use multi-arch go-compile to compile tools
This now completes the steps to bootstrap the other
packages with multi-arch as we now have the tools both
on arm64 and amd64.

Also update vendoring doc with new hash

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-08-03 17:36:22 +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
b47e0226ed Update Moby to use new ISO unpacking
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-08-02 14:47:41 +01:00
Rolf Neugebauer
3e201cb862 Add manifest-tool to the top-level Makefile
The manifest-tool will be used to build multi-arch hub
images and currently needs a patched version to print
out the size/length of the manifest pushed to hub to
enable signing with notary.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-08-01 15:25:30 +01:00
Justin Cormack
eacce1d52e Use overlay for writeable containers
Previously we would sneakily remount as `rw` but of course you can't
really do that on a truly immutable filesystem.

See https://github.com/moby/tool/pull/129 for the `moby` side.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-07-31 13:48:23 +01:00
Justin Cormack
978910e48d Update moby hash
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-07-25 15:44:06 +01:00
Justin Cormack
cfbdb93919 Allow overriding moby repo for testing
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-07-25 15:30:24 +01:00
Ian Campbell
19207bb81b Update yml and moby version
Signed-off-by: Ian Campbell <ijc@docker.com>
2017-07-20 14:13:20 +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
2f0933ba43 Merge pull request #2238 from justincormack/shutdown
Add onshutdown support
2017-07-18 15:23:27 +01:00
Justin Cormack
96e71324c6 Update moby tool for onshutdown support
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-07-18 14:20:59 +01:00
Dave Tucker
8a07c75e34 Makefile: Update rtf version
This update brings in linuxkit/rtf#24 that fixes panics in cases where
there are concurrent reads/writes of the logging backends.

Signed-off-by: Dave Tucker <dt@docker.com>
2017-07-18 13:48:54 +01:00
Justin Cormack
7886e61e3d Update moby to support metadata
Add the yaml config to the default `linuxkit.yml`. You can check
this with `cat /proc/1/root/etc/linuxkit-config`.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-07-17 15:58:11 +01:00
Rolf Neugebauer
b79f677418 build: Upda moby tool to the latest
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-07-14 15:02:42 +01:00
Ian Campbell
f67050b5ed Bump moby tool to 4db06aa173
$ git log --oneline 51b4e201544f..4db06aa1732b
4db06aa Merge pull request #111 from ijc/master
f20828b Update LinuxKit components used for build
75cc04a Merge pull request #109 from justincormack/contributing
b4804b6 Add Contributing doc

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-07-13 14:49:43 +01:00
Ian Campbell
a82ec03120 Update to moby tool 51b4e20154
$ git log --no-merges --oneline d8cc1b3f08df..51b4e201544f
6c6499b Update docker/docker vendor to 6978a6e25a2e6063f280ec842bd0f3eae99426e1
3ee4fdc Error if there are duplicate service names
3c5fad4 Remove dependency on docker/docker/cli
5e75f8c Only run `go test` and `go vet` if not cross building (i.e. ${GOOS} unset)
48f1dd0 Build for Darwin and Windows in CI
c3edfec revendor runc + runtime-spec to match containerd 8e1a04ff9ee3
a73c3d3 Add partial user namespace support
0acaaa7 Assign each container a uid and gid it can use
c5070df Add docs for ambient capabilities
66b4aed Add support for ambient capabilities
c2e460f check that caps are valid
b605e61 Adding dynamic-vhd Output Format
e7ebabd Split out into a small stub command line and a library
4401e7d Rename the docker run function
c5cccad Return errors from build internal function
618dc42 Allow creation of empty files
ad3de8f Add support for rlimits
13da5e0 Use hyperkit to make raw disks

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2017-07-13 10:37:24 +01:00
Justin Cormack
107c014a9d Re-run vendoring
Latest `vndr` has changed its algorithm a bit. It also pointed out that we were missing
some things.

Move the `vendor` directory up to the `linuxkit` command, else it gets confused by packages
that have Go code in.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-07-11 13:12:00 +01:00
Justin Cormack
775f43daf0 Add raw files to make clean
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-07-09 17:31:44 +01:00
Kunal Kushwaha
d9b5c5a116 docker run works behind proxy too.
Signed-off-by: Kunal Kushwaha <kushwaha_kunal_v7@lab.ntt.co.jp>
2017-07-04 09:25:14 +09:00
Rolf Neugebauer
b062a57e6c build: Update go-compile image to latest
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-07-01 18:11:45 +01:00
Dave Tucker
ffe6113416 Makefile: bump rtf version
This version includes better sorting of mixed tests/subgroups

Signed-off-by: Dave Tucker <dt@docker.com>
2017-06-28 11:49:01 +01:00
Justin Cormack
3f5c236de7 Add a target for the cross build tests and make parallel
Trying to speed up build a bit.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-06-26 13:39:47 +01:00
Justin Cormack
50c3c38a18 Clean up Makefile
- clean up incorrect lines such as `tar xf tmp_linuxkit_bin.tar > $@`
- split out targets to make tarballs and to untar

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-06-26 13:29:37 +01:00