Commit Graph

4125 Commits

Author SHA1 Message Date
Ian Campbell
fe918f8a31 pkg: Run git update-index --refresh before git diff-index.
Otherwise files which have an updated timestamp but no actual changes are
marked as changes because `git diff-index` only uses the `lstat` result and not
the actual file contents. Running `git update-index --refresh` updates the
cache.

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2017-07-03 10:27:31 +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
Ian Campbell
c9b5cbf89b kernel: Calculate HASH and DIRTY in the same way as pkg/package.mk
The definition of `$(TAG)` differs from pkg/package.mk and is only the
HASH+DIRTY since the full tag is defined by the kernel macro and varies for
each kernel.

Also `show-tag` is `show-tags` here due to the multiple builds. Individual
`show-tag_FOO` rules are provided similar to the `build_FOO` rules.

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2017-07-03 10:27:31 +01:00
Ian Campbell
7fd155b38d pkg: Do not mark user supplied HASH as dirty
If a user passes a HASH e.g. HASH=dev then assume they know what they are doing
and don't need dirty tracking.

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2017-07-03 10:27:31 +01:00
Ian Campbell
bdd7e7163b pkg: Allow override of commit to calculate hash for show-tag
Useful to answer the question of what the hash was at the point of some older
commit.

$ make --no-print-directory -C pkg/init/ show-tag
linuxkit/init:36c56f0664d49c5a6adc1120d1bf5ba6ac30b389
$ make --no-print-directory -C pkg/init/ show-tag HASH_COMMIT=4699f80ef73141ee87a77d03f93065e541fab382
linuxkit/init:17693d233dd009b2a3a8d23673cb85969e1dce80

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
Ian Campbell
1ea64d33f0 pkg: use Jessie-era compatible git command for calculating $(HASH)
The current rune for $(HASH) returns nothing with the Jessie version of git
(2.1.4). Using `--full-tree` works corectly but requires an absolute path (else
it produces e.g. "fatal: ../init: '../init' is outside repository").

Both `ls-tree` and `diff-index` are happy with a full absolute path, which
simplifies things since we can use `$(CURDIR)` directly.

Tested with a dirty `pkg/init` on both Jessie (git 2.1.4) and Stretch (git
2.11.0) with the following command, which produces identical output in both
cases:

$ for pkg in init containerd ; do make -C pkg/$pkg --no-print-directory show-tag; ( cd pkg/$pkg && make show-tag ); done
linuxkit/init:36c56f0664d49c5a6adc1120d1bf5ba6ac30b389-dirty
linuxkit/init:36c56f0664d49c5a6adc1120d1bf5ba6ac30b389-dirty
linuxkit/containerd:1e3e8f207421de8deac8cedc26a138d6b1661a0d
linuxkit/containerd:1e3e8f207421de8deac8cedc26a138d6b1661a0d

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2017-07-03 10:27:31 +01:00
Ian Campbell
66f9cc134f pkg: Consolidate $(TAG) to be the full tag
Saves lots of repetitions of `$(ORG)/$(IMAGE):$(HASH)$(DIRTY)` throughout the
file.

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2017-07-03 10:27:31 +01:00
Ian Campbell
4a3d5acb88 pkg: Only consider the package directory itself for dirty tracking.
Since this is what is used in the hash.

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2017-07-03 10:27:31 +01:00
Ian Campbell
b6728a85e9 pkg: Simplify dirty handling
By setting `DIRTY` to either "-dirty" or "" directly we can simply use
`$(HASH)$(DIRTY)` and avoid make adding a space as it does with `+=`.

For the push check we now block pushing if `$(DIRTY)` is non-empty.

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2017-07-03 10:27:31 +01:00
Ian Campbell
55f537631a pkg: add target to print the tag
$ make --no-print-directory -C pkg/init/ show-tag
linuxkit/init:36c56f0664d49c5a6adc1120d1bf5ba6ac30b389

Useful for scripting etc.

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2017-07-03 10:27:31 +01:00
Rolf Neugebauer
bc8180ad89 Merge pull request #2142 from rn/pkg
Fix and update packages
2017-07-03 10:23:52 +01:00
Rolf Neugebauer
89c40eaddb Update hashes in YAML files
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-07-01 19:24:16 +01:00
Rolf Neugebauer
c2c8ea8689 test: Update docker-bench to 17.06.0-ce and new URL scheme
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-07-01 19:24:16 +01:00
Rolf Neugebauer
a148a8aa45 pkg: Fix docker-ce package
As of commit b2439251dd ("blueprints: update docker-for-mac.yml
to latest vpnkit packages") the docker-ce package does not need
the vpnkit-expose-port binary anymore. It was also removed from
the linuxkit/vpnkit-forwarder forwarder package with commit
f48a2bfe12 ("pkg: update vpnkit-forwarder") causing the docker-ce
package build to fail.

This commit fixes this by removing the linuxkit/vpnkit-forwarder
package from the docker-ce package build.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-07-01 19:24:16 +01:00
Rolf Neugebauer
4a9c00a5e0 src: Update qemu image to latest
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-07-01 19:24:15 +01: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
Rolf Neugebauer
4c1a45957e pkg: Add NETWORK to audit and rngd packages
This fixes a regression introduced in:
5a225b9d ("Makefile: Fix bug where network was not disabled")

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-07-01 18:11:45 +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
Justin Cormack
58201d3d3c Merge pull request #2124 from MagnusS/add-vpnkit-init
DfM: Add support for exposing swarm service ports
2017-07-01 10:52:57 +01:00
Justin Cormack
6c837b28b6 Merge pull request #2133 from samoht/fdd
sdk: add a yml example on how to use fdd to create container channels
2017-07-01 10:51:58 +01:00
Rolf Neugebauer
aaf19172ef Merge pull request #2141 from riyazdf/sig-announce-memorizer
sig-security: add announcement for memorizer
2017-07-01 01:15:47 +01:00
Riyaz Faizullabhoy
997ad2f81b sig-security: add announcement for memorizer
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2017-06-30 15:31:23 -07:00
Rolf Neugebauer
422b34cb86 Merge pull request #2140 from rn/kern-up
Update kernels to 4.11.8/4.9.35/4.4.75
2017-06-30 19:32:44 +01:00
Magnus Skjegstad
b2439251dd blueprints: update docker-for-mac.yml to latest vpnkit packages
Signed-off-by: Magnus Skjegstad <magnus@skjegstad.com>
2017-06-30 19:35:30 +02:00
Magnus Skjegstad
f48a2bfe12 pkg: update vpnkit-forwarder
Update to latest commit and don't include the binaries that are now in
vpnkit-expose-port.

Signed-off-by: Magnus Skjegstad <magnus@skjegstad.com>
2017-06-30 19:26:47 +02:00
Magnus Skjegstad
6c83b98a40 pkg: add vpnkit-expose-port
This package contains vpnkit binaries needed inside the dockerd
container that can be either copied into the container with a multistage
build or used as an init-container and bind-mounted to the right
locations.

vpnkit-expose-port is a userland proxy that interacts with vpnkit and
the vpnkit-forwarder service to open ports on the host.

vpnkit-iptables-wrapper wraps iptables to launch
vpnkit-expose-port automatically when ports are opened to a swarm
service.

Signed-off-by: Magnus Skjegstad <magnus@skjegstad.com>
2017-06-30 19:26:02 +02:00
Rolf Neugebauer
4c6e0264b9 Update kernels in YAML files
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-06-30 18:23:29 +01:00
Rolf Neugebauer
8cee2cd68b kernel: Update to 4.11.8/4.9.35/4.4.75
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-06-30 18:23:29 +01:00
Justin Cormack
9add9622f7 Merge pull request #2137 from MagnusS/split-blueprints
Split DfM blueprint in base and docker yml
2017-06-30 18:02:07 +01:00
Thomas Gazagnaire
5525937c10 sdk: add fdd exec to map socketpair shares to local fds
To enable this:

```
$ fdd init &
$ fdd share /tmp/foo

$ fdd exec -m /tmp/foo:1:2 -- echo hello world!

$ fdd exec -m /tmp/foo:0 -- cat
hello world!
```

Signed-off-by: Thomas Gazagnaire <thomas@gazagnaire.org>
2017-06-30 16:11:41 +02:00
Thomas Gazagnaire
b4feb71f78 sdk: add a yml example on how to use fdd to create container channels
Lots of boilerplate for now on, will work on upstreaming that in the tool
properly if needed later.

Signed-off-by: Thomas Gazagnaire <thomas@gazagnaire.org>
2017-06-30 16:11:41 +02:00
Magnus Skjegstad
fcf12d9f5a dfm blueprint: use same port as DfM
Signed-off-by: Magnus Skjegstad <magnus@skjegstad.com>
2017-06-30 16:03:20 +02:00
Magnus Skjegstad
7c2c3af3c1 tests: update DfM build test to use new blueprint
Signed-off-by: Magnus Skjegstad <magnus@skjegstad.com>
2017-06-30 16:03:03 +02:00
Magnus Skjegstad
0d3c6d124f blueprints: split dfm blueprint into base and docker yml
Signed-off-by: Magnus Skjegstad <magnus@skjegstad.com>
2017-06-30 15:41:03 +02:00
Justin Cormack
55957ebb87 Merge pull request #2135 from dave-tucker/fix-2134
Makefile: Fix bug where network was not disabled
2017-06-30 14:29:58 +01:00
Dave Tucker
5a225b9dc5 Makefile: Fix bug where network was not disabled
This commit moves the include statement to the bottom of the file to
ensure that all variables are set before conditionals are evaluated.

I also changed the ifndef NETWORK to ifdef NETWORK as the former was
incorrect. We want `NET_OPTS="--network=none"` in cases where NETWORK is
not defined.

Fixes: #2134

Signed-off-by: Dave Tucker <dt@docker.com>
2017-06-30 11:55:08 +01:00
Rolf Neugebauer
736713dc8f Merge pull request #2120 from dave-tucker/getty
Make it more obvious that getty/sshd are namespaced
2017-06-29 23:30:17 +01:00
Riyaz Faizullabhoy
11e19703a2 Merge pull request #2130 from caminada/master
Bind /etc/docker/daemon.json in examples/docker.yml
2017-06-29 14:42:07 -07:00
Riyaz Faizullabhoy
eacb1d31f3 Merge pull request #2129 from samoht/fdd
sdk: add a file-descriptor sharing server
2017-06-29 14:41:43 -07:00
Daniel Caminada
f298264f63 Bind /etc/docker/daemon.json in examples/docker.yml
Signed-off-by: Daniel Caminada <daniel.caminada@ergon.ch>
2017-06-29 19:55:31 +02:00
Rolf Neugebauer
9d15799700 Merge pull request #2127 from justincormack/dockerup
Update Docker CE to 17.06.0
2017-06-29 17:19:24 +01:00
Thomas Gazagnaire
875b877047 sdk: add Dockerfile root pivot runs + static linking
Signed-off-by: Thomas Gazagnaire <thomas@gazagnaire.org>
2017-06-29 18:17:02 +02:00
Thomas Gazagnaire
56229e486b sdk: add a file-descriptor sharing server
```
$ fdd init &
$ fdd share /tmp/foo # serve a fresh socketpair on that path
$ fdd test /tmp/foo  # read the socketpair and test that it works
```

Instead of `fdd test` (which is only useful for testing), users are expected to
connect to the unix domain socket and call `recvmsg(2)`. They will get one side
of the socketpair. Two different processes can do this and they will be able to
talk to each other.

Signed-off-by: Thomas Gazagnaire <thomas@gazagnaire.org>
2017-06-29 17:53:49 +02:00
Justin Cormack
5c25162c69 Merge pull request #2125 from justincormack/authorsup
Update AUTHORS
2017-06-29 16:50:09 +01:00
Justin Cormack
c8a8bb047c Update docker-ce in Yaml files
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-06-29 15:30:45 +01:00
Justin Cormack
fed24c4110 Update to Docker 17.06.0-ce
Note that the location of the static binaries changed.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-06-29 15:27:34 +01:00