Граф коммитов

32222 Коммитов

Автор SHA1 Сообщение Дата
Daniel Nephin d624f9a7b0 Merge pull request #32406 from ijc25/docker-build-iidfile
Add `docker build --iidfile=FILE`
2017-05-05 13:56:31 -04:00
Vincent Demeester 230bc34837 Merge pull request #32849 from aaronlehmann/vendor-swarmkit-62d58ee
Vendor swarmkit 8f053c2
2017-05-05 19:20:11 +02:00
Ian Campbell 5894bc1abf Add `docker build --iidfile=FILE`
This is synonymous with `docker run --cidfile=FILE` and writes the digest of
the newly built image to the named file. This is intended to be used by build
systems which want to avoid tagging (perhaps because they are in CI or
otherwise want to avoid fixed names which can clash) by enabling e.g. Makefile
constructs like:

    image.id: Dockerfile
    	docker build --iidfile=image.id .

    do-some-more-stuff: image.id
    	do-stuff-with <image.id

Currently the only way to achieve this is to use `docker build -q` and capture
the stdout, but at the expense of losing the build output.

In non-silent mode (without `-q`) with API >= v1.29 the caller will now see a
`JSONMessage` with the `Aux` field containing a `types.BuildResult` in the
output stream for each image/layer produced during the build, with the final
one being the end product.  Having all of the intermediate images might be
interesting in some cases.

In silent mode (with `-q`) there is no change, on success the only output will
be the resulting image digest as it was previosuly.

There was no wrapper to just output an Aux section without enclosing it in a
Progress, so add one here.

Added some tests to integration cli tests.

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2017-05-05 16:35:54 +01:00
Akihiro Suda b61ffbfb52 Merge pull request #33033 from YuPengZTE/devReadAll
check err
2017-05-05 22:33:23 +09:00
Brian Goff 4662d3e9be Merge pull request #32972 from thaJeztah/compose-move-labels-to-3.3
Move "labels" to compose 3.3 format
2017-05-05 09:25:43 -04:00
Brian Goff b106dd8b57 Merge pull request #32952 from dnephin/refactor-builder-dispatch-state
[Builder] Move dispatch state to a new struct
2017-05-05 09:00:57 -04:00
Vincent Demeester 5f0ea4d016 Merge pull request #33035 from YuPengZTE/devCheckpointList
check err
2017-05-05 14:24:48 +02:00
Brian Goff 05ad14fc1b Merge pull request #31104 from cpuguy83/dm_lvmsetup
Add option to auto-configure blkdev for devmapper
2017-05-05 07:35:24 -04:00
yupengzte 130d1491b7 check err and add print
Signed-off-by: yupengzte <yu.peng36@zte.com.cn>
2017-05-05 14:50:00 +08:00
yupengzte 0d99cb8629 check err
Signed-off-by: yupengzte <yu.peng36@zte.com.cn>
2017-05-05 13:33:40 +08:00
Sebastiaan van Stijn 118d4ee123 Merge pull request #32951 from wsong/patch-2
Add a proper type to the Source field in Mount
2017-05-04 17:09:25 -07:00
Daniel Nephin 2f0ebba0e7 Some refactoring of dispatch()
Remove runConfig from Builder and dispatchRequest. It is not only on
dispatchState.

Move dispatch state fields from Builder to dispatchState

Move stageName tracking to dispatchRequest.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-05-04 17:11:08 -04:00
Tibor Vass a74833aa70 Merge pull request #33019 from tianon/docker-crossplatforms
Only set DOCKER_CROSSPLATFORMS from env if it's set
2017-05-04 12:22:32 -07:00
Tõnis Tiigi 2f3f1e6ccd Merge pull request #32727 from darrenstahlmsft/WindowsSmallNanoCPUs
Prevent a non-zero NanoCPUs from setting a zero CPU.Count
2017-05-04 09:37:55 -07:00
Tianon Gravi 9c9cc5ec43 Only set DOCKER_CROSSPLATFORMS from env if it's set
This allows for the default to come from the image/`Dockerfile` rather
than being unconditionally overwritten by the environment.

Signed-off-by: Andrew "Tianon" Page <admwiggin@gmail.com>
2017-05-04 07:13:09 -07:00
Brian Goff 140fefd581 Merge pull request #32944 from cpuguy83/add_no_new_privs_flag
Add no-new-privileg flag
2017-05-04 09:23:01 -04:00
Brian Goff 865a5fd5e3 Merge pull request #32946 from cpuguy83/add_logdrivers_to_info_api_doc
Add swagger spec for /info Log plugins
2017-05-04 09:20:51 -04:00
Sebastiaan van Stijn a0fe5e9ca0 Merge pull request #33003 from philippgille/patch-1
Fix list of experimental features
2017-05-03 18:35:55 -07:00
Philipp Gillé 5657f05b5a Fix list of experimental features
- Remove duplicate entry
- Fix anchor in link

Signed-off-by: Philipp Gille <philipp.gille@gmail.com>
2017-05-03 23:29:11 +02:00
Sebastiaan van Stijn bf5cf84534 Merge pull request #32965 from ijc25/setarch-2.6
seccomp: Allow personality with UNAME26 bit set.
2017-05-03 13:44:21 -07:00
Vincent Demeester fa4b377bbc Merge pull request #32876 from YuPengZTE/devIneffectualAssignment
delete ineffectual assignment
2017-05-03 20:55:57 +02:00
Daniel Nephin 37be263826 Merge pull request #32749 from dnephin/rm-ContainerUpdateCmdOnBuild
[Builder] Remove ContainerUpdateCmdOnBuild
2017-05-03 14:02:08 -04:00
Brian Goff 5ef07d79c4 Add option to auto-configure blkdev for devmapper
Instead of forcing users to manually configure a block device to use
with devmapper, this gives the user the option to let the devmapper
driver configure a device for them.

Adds several new options to the devmapper storage-opts:

- dm.directlvm_device="" - path to the block device to configure for
  direct-lvm
- dm.thinp_percent=95 - sets the percentage of space to use for
  storage from the passed in block device
- dm.thinp_metapercent=1 - sets the percentage of space to for metadata
  storage from the passed in block device
- dm.thinp_autoextend_threshold=80 - sets the threshold for when `lvm`
  should automatically extend the thin pool as a percentage of the total
  storage space
- dm.thinp_autoextend_percent=20 - sets the percentage to increase the
  thin pool by when an autoextend is triggered.

Defaults are taken from
[here](https://docs.docker.com/engine/userguide/storagedriver/device-mapper-driver/#/configure-direct-lvm-mode-for-production)

The only option that is required is `dm.directlvm_device` for docker to
set everything up.

Changes to these settings are not currently supported and will error
out.
Future work could support allowing changes to these values.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2017-05-03 13:49:15 -04:00
Aaron Lehmann 08d7fad45d Merge pull request #32949 from dnephin/refactor-streamformatter-and-progress
Refacator pkg/streamformatter
2017-05-03 09:05:26 -07:00
Daniel Nephin d9371ee807 Fix run with entrypoint in base image
Update a test to use a base image with entrypoint to that the linux build
has at least one test that behaves like all the windows tests.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-05-03 10:59:38 -04:00
Daniel Nephin 97f8607164 Remove ContainerUpdateCmdOnBuild, it does nothing.
Set a blank entrypoint to preserve the old behaviour.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-05-03 10:59:38 -04:00
Daniel Nephin 3dcab28982 Fix setting b.runConfig.Image at arbitrary places.
Previously this value was set at some point attrbitrarily between when it was updated and when it was going to be used next.

Instead always set it as the last step of dispatch.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-05-03 10:59:37 -04:00
Vincent Demeester d35fc14099 Merge pull request #32773 from dnephin/refactor-builder-split-commit-2
[Builder] Cleanup unnecessary mutate then revert of b.runConfig
2017-05-03 16:39:46 +02:00
Sebastiaan van Stijn f3dfcfd307 Merge pull request #32701 from gschaetz/master
Explain why "docker attach" may appear to hang
2017-05-02 18:12:44 -07:00
Gary Schaetz a34f9b0bb1 Update attach.md
added some clarification around why attach can appear hung to some.  issue #1456 on docs

Signed-off-by: gary schaetz <gary@schaetzkc.com>

Updated the documentation to reflect what happens when you use a fragment in
the docker build url parameter.

Signed-off-by: Gary Schaetz <gary@schaetzkc.com>

added markup for commands

Signed-off-by: Gary Schaetz <gary@schaetzkc.com>
2017-05-02 18:09:04 -07:00
Sebastiaan van Stijn 7844876547 Merge pull request #32751 from michaelspets/32748-add-doc
add desc for system events [fixes #32748]
2017-05-02 16:15:51 -07:00
Aaron Lehmann 077f08bf54 Vendor swarmkit 8f053c2
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2017-05-02 15:51:26 -07:00
Sebastiaan van Stijn ef20f027cc Merge pull request #32943 from dsheets/docs-dockerd-fix-authz-chain
docs/dockerd: correct authz plugin chain semantics
2017-05-02 15:25:02 -07:00
Daniel Nephin c87d67b0ad Refacator pkg/streamformatter
StreamFormatter suffered was two distinct structs mixed into a single struct
without any overlap.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-05-02 17:38:12 -04:00
Sebastiaan van Stijn 4f522580f5
Move "labels" to compose 3.3 format
Commit bb5dfdb8c5 added a
labels option to the docker-compose file format, but
added it to the 3.2 schema.

This patch moves the change to the 3.3 schema

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-05-02 13:35:48 -07:00
Brian Goff 146e058592 Add swagger spec for /info Log plugins
The `Log` field for plugins was added to `/info` in
17abacb894 but the swagger spec was not
updated.
This just updates the spec to match reality.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2017-05-02 14:42:41 -04:00
Sebastiaan van Stijn fa54c94b9d Merge pull request #32953 from vieux/reports
Add dev report for may 1st
2017-05-02 10:41:31 -07:00
Victor Vieux 67ac02d4a6 Add dev report for may 1st
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2017-05-02 10:23:56 -07:00
Sebastiaan van Stijn 0fe924ad98 Merge pull request #32961 from ijc25/re-vndr
Update to latest vndr c56e08229111
2017-05-02 09:51:57 -07:00
Wayne Song 7a95836931 Add a proper type to the Source field in Mount
This field was missing a type, which meant that the example objects that Swagger tools generate did not work.

Signed-off-by: Wayne Song <wsong@docker.com>
2017-05-02 09:39:52 -07:00
Ian Campbell cd456433ea seccomp: Allow personality with UNAME26 bit set.
From personality(2):

    Have uname(2) report a 2.6.40+ version number rather than a 3.x version
    number.  Added as a stopgap measure to support broken applications that
    could not handle the  kernel  version-numbering  switch  from 2.6.x to 3.x.

This allows both "UNAME26|PER_LINUX" and "UNAME26|PER_LINUX32".

Fixes: #32839

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2017-05-02 15:05:01 +01:00
Vincent Demeester 1d0b921d70 Merge pull request #32937 from dsheets/daemon-info-authz-dont-sort
daemon/info: don't sort authorization plugins as order matters
2017-05-02 14:10:59 +02:00
Vincent Demeester 1504d51701 Merge pull request #32843 from ehazlett/stack-service-filter
Remove service runtime filter in stack command
2017-05-02 14:10:20 +02:00
Ian Campbell a28d91349e Update to latest vndr c56e08229111
Changes are:

$ git log --no-merges --oneline 19220953c4a4..c56e08229111
4b76270 Keep "vendor.conf" for reference
ac8f766 travis: update to go 1.8.1
c196644 Better validation of duplicates
e684d5e check for unused packages at the end
3ed2513 detect default gopath($HOME/go)
c9052f3 fix backtick in readme
0e04f23 Missing installation section in README

Changes to moby are the inclusion of several upstream vendor.conf files and
switching to vendoring the toplevel golang.org/x/sync package rather than the
syncmap sub-package due to:

2017/05/02 11:21:06 WARNING: package golang.org/x/sync/syncmap is not root import, should be golang.org/x/sync

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2017-05-02 11:23:36 +01:00
David Sheets cfcf2a0cec daemon/info: don't sort authorization plugins as order matters
plugins exist in a chain that composes potentially mutating requests and
responses. This simply reverts the sorting of AuthZ plugins so that the
/info API endpoint returns the internal ordering used for AuthZ composition.

Volume driver plugins are not affected because they are just a set.

Signed-off-by: David Sheets <dsheets@docker.com>
2017-05-02 09:39:32 +01:00
Daniel Nephin 9f738cc574 Cleanup all the mutate + defer revert of b.runConfig in the builder
Instead of mutating and reverting, just create a copy and pass the copy
around.

Add a unit test for builder dispatcher.run

Fix two test failures

Fix image history by adding a CreatedBy to commit options. Previously the
createdBy field was being created by modifying a reference to the runConfig that
was held from when the container was created.

Fix a test that expected a trailing slash. Previously the runConfig was being
modified by container create. Now that we're creating a copy of runConfig
instead of sharing a reference the runConfig retains the trailing slash.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-05-01 18:36:53 -04:00
Daniel Nephin 73abe0c682 Merge pull request #32610 from dnephin/builder-move-tag-and-squash
Extract squash and tagging from the Dockerfile builder
2017-05-01 18:25:36 -04:00
Brian Goff ba332a60b2 Add no-new-privileg flag
The daemon config for defaulting to no-new-privileges for containers was
added in d7fda019bb, but somehow we
managed to omit the flag itself, but also documented the flag.
This just adds the actual flag.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2017-05-01 15:31:56 -04:00
Daniel Nephin 0296797f0f Extract squash and tagging from the Dockerfile builder.
Remove pathCache and replace it with syncmap
Cleanup NewBuilder
Create an api/server/backend/build
Extract BuildTagger

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-05-01 12:07:32 -04:00
Daniel Nephin f07811f766 Vendor syncmap
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-05-01 11:49:43 -04:00