Commit Graph

2339 Commits

Author SHA1 Message Date
400bf9fc6d Prevent ppc64le to build pkg/term without cgo
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 71e9f5c520bd457508994b11938b7a6c577beaaf
Component: engine
2017-05-05 12:14:30 -07:00
bd17f42bef 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>
Upstream-commit: 5894bc1abf8186802d360d20739b57bfffed51df
Component: engine
2017-05-05 16:35:54 +01:00
755f9321e1 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>
Upstream-commit: c87d67b0ad788a6a80d1af89488e2d1f22726c34
Component: engine
2017-05-02 17:38:12 -04:00
4554383dcd Merge pull request #31391 from cpuguy83/fix_volume_unmount_disconnected_fs
Use lazy unmount for local volume driver unmount
Upstream-commit: ccc1324b59e5768a3ef0236f112e1af20f7fbd2f
Component: engine
2017-04-27 16:22:58 -04:00
e369d2c215 Don't error with empty group
Don't error if no group is specified, as this was the prior API.  Also
don't return a docker specific error message as this is in `/pkg` and
used by other projects.  Just set the default group for the current
user/group consuming the package.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 169c013911c9465f0e62a37f467d1afa54a0dbe7
Component: engine
2017-04-27 09:26:21 -07:00
2805ccbd34 Use lazy unmount for local volume driver unmount
This fixes issues where the underlying filesystem may be disconnected and
attempting to unmount may cause a hang.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: acbfe6bc56b9357d40a452f6b3901cb2c2d40404
Component: engine
2017-04-27 08:43:43 -04:00
60d521eac2 Merge pull request #32768 from dnephin/try-enable-test-matches-on-windows
Enable TestMatches on windows
Upstream-commit: c264aefdac2d0698df62d203455fcee83e9fd7ee
Component: engine
2017-04-23 15:54:45 +02:00
f1f010b701 Enable a unit test on windows.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 9484c3bd81fa8aab46b7268c5c3bfeb8e14aa369
Component: engine
2017-04-21 12:31:16 -04:00
987b06e286 Use cli for trusted relate command
This also removed some skipped test (that are skipped for a long while).

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: b0ba39d4312ff20b11fc777092cc0c3e5ddeb19f
Component: engine
2017-04-19 14:04:39 +02:00
142883d5b3 Remove pkg/testutil/assert in favor of testify
I noticed that we're using a homegrown package for assertions. The
functions are extremely similar to testify, but with enough slight
differences to be confusing (for example, Equal takes its arguments in a
different order). We already vendor testify, and it's used in a few
places by tests.

I also found some problems with pkg/testutil/assert. For example, the
NotNil function seems to be broken. It checks the argument against
"nil", which only works for an interface. If you pass in a nil map or
slice, the equality check will fail.

In the interest of avoiding NIH, I'm proposing replacing
pkg/testutil/assert with testify. The test code looks almost the same,
but we avoid the confusion of having two similar but slightly different
assertion packages, and having to maintain our own package instead of
using a commonly-used one.

In the process, I found a few places where the tests should halt if an
assertion fails, so I've made those cases (that I noticed) use "require"
instead of "assert", and I've vendored the "require" package from
testify alongside the already-present "assert" package.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 6052f2b3969feadb01662d8e2f30337d9c7f61af
Component: engine
2017-04-14 12:03:21 -07:00
670f141a55 Add docs for reading Dockerfile from stdin.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: e838679cd7954775cbe7ff72ef2da02dbe791fcb
Component: engine
2017-04-11 11:40:10 -04:00
15fc803536 Merge pull request #31236 from tonistiigi/docker-stdin
build: accept -f - to read Dockerfile from stdin
Upstream-commit: 778e32a2fadcf1ccb1819ad6534af5c477585300
Component: engine
2017-04-10 20:14:54 +02:00
f1d65fe958 Merge pull request #32450 from miaoyq/fixed-a-bug-of-multireader
Reset the positions for all readers of multireader before reading the data
Upstream-commit: 8fabe07982e04dd17e2e3cdcd0456bb782576d5e
Component: engine
2017-04-10 11:39:47 -04:00
aebc58bf87 Reset the position of all readers before reading the data
Signed-off-by: Yanqiang Miao <miao.yanqiang@zte.com.cn>
Upstream-commit: fd06bd6f96f1be5c14f30314b9c8c323b19219ed
Component: engine
2017-04-08 13:38:15 +08:00
4adfcf1302 Upadte archive.ReplaceFileTarWrapper() to not expect a sorted archive
Improve test coverage of ReplaceFileTarWrapper()

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 8cd6c30a489f7a0210526b0f94469c525ba8e0ee
Component: engine
2017-04-06 13:36:34 -04:00
d862a42e27 Merge pull request #32387 from Microsoft/jjh/tidystat
Tidy pkg\system *stat* functions
Upstream-commit: fa3e2d5ab9b577cecd24201902bbe72b3f1b851c
Component: engine
2017-04-06 08:40:27 -04:00
2b71862e00 Merge pull request #32383 from Microsoft/jjh/removeunused
Windows: Remove unused process_windows.go
Upstream-commit: 9691170de99cf2e306640ec64f2c9d787100dfa9
Component: engine
2017-04-05 23:32:40 -04:00
3712bab8c4 Factor out adding dockerfile from stdin.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 56bf6de9f7f0d8e35a5170faf0c35ad07c89d04c
Component: engine
2017-04-05 19:42:31 -04:00
06ea8bf159 build: accept -f - to read Dockerfile from stdin
Heavily based on implementation by David Sheets

Signed-off-by: David Sheets <sheets@alum.mit.edu>
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 3f6dc81e10b8b813fffaa9b4167a60c5a507fa38
Component: engine
2017-04-05 19:42:31 -04:00
408ae7e45b Tidy pkg\system *stat* functions
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 16c1ede79c1771cd95642ff022e75032b594d604
Component: engine
2017-04-05 16:01:53 -07:00
e2c2909317 Windows: Remove unused process_windows.go
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 329daee5ef737fed010e1995555064b44bea1efe
Component: engine
2017-04-05 11:04:34 -07:00
e84d96f81f Synchronous service create and service update
Change "service create" and "service update" to wait until the creation
or update finishes, when --detach=false is specified. Show progress bars
for the overall operation and for each individual task (when there are a
small enough number of tasks), unless "-q" / "--quiet" is specified.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 330a0035334871d92207b583c1c36d52a244753f
Component: engine
2017-04-03 09:46:01 -07:00
69889bcffd Merge pull request #32222 from unclejack/small_cleanup
Small cleanup
Upstream-commit: 9c0473fa652307c842f0f16297c4a38d409dfb60
Component: engine
2017-03-30 21:09:39 +02:00
f23397c0c0 pkg/*: clean up a few issues
Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com>
Upstream-commit: a23c456e5a136d65d02d66af398af1e3ce3a4081
Component: engine
2017-03-30 16:50:46 +03:00
5ea7e1e7af pkg/urlutil: don't compare to bool
Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com>
Upstream-commit: 90a44b875ca87e0b990eef24a3fb84275d0e6fb1
Component: engine
2017-03-30 16:38:01 +03:00
b17c0beaf9 pkg/file{utils,notify}: don't compare to bool
Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com>
Upstream-commit: 20d6f5c2a96b5b07341fdb57474d3615ad45a1e6
Component: engine
2017-03-30 16:38:01 +03:00
2b11da50bf pkg/{chroot,}archive: clean up a few small issues
Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com>
Upstream-commit: 087f7307a66a347bea9335c614a28f8c2fa7ddcb
Component: engine
2017-03-30 16:37:54 +03:00
ebb760e3cd Make pkg/devicemapper and pkg/loopback depend on cgo in build tags
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 85357a1167f22be9606b770a872339df459af490
Component: engine
2017-03-29 17:55:42 -07:00
7b9ebed75d plugins: Rename plugins_linux.go to plugins_unix.go and use build tags
This allows pkg/authorization to build on OS X.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 3da119282806187079b1a6dfdfb0de7631a78647
Component: engine
2017-03-29 14:06:59 -07:00
a904ff4596 Merge pull request #32156 from cpuguy83/index_copy_new_slice
Don't pass reference to mutable slice
Upstream-commit: 95510551cea4a1211070ecdc5f1319f5aa2c9a7c
Component: engine
2017-03-28 10:23:08 +02:00
80739547ec Don't pass reference to mutable slice
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: d5b7839008f80a82063869c43ee197a3b6781ca3
Component: engine
2017-03-27 21:23:06 -04:00
d50bce7193 Fix building client on OpenBSD
Signed-off-by: Ivan Markin <twim@riseup.net>
Upstream-commit: 925bc27b8108a154161b578e176d2b7d79e8002c
Component: engine
2017-03-26 20:47:18 +00:00
dd50f0df64 Merge pull request #31608 from vdemeester/integration-cli-package
[test-integration] Introduce a `cli` package for test-integration
Upstream-commit: 8008f6529394d8c458ccf58f4763754681568b57
Component: engine
2017-03-24 13:04:47 +09:00
c90ad1369f Merge pull request #31257 from tonistiigi/nested-build
build: add multi-stage build support
Upstream-commit: 2fa8fe400d926b3ceb0c84640a8f4e0f36e51463
Component: engine
2017-03-23 19:14:13 -07:00
e59b5a1439 Add support for COPY from previous rootfs
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: f95f58283b2a69f4fd06d01de2281641e09b06bb
Component: engine
2017-03-23 15:12:15 -07:00
9210b1bdbd Introduce a cli package for test-integration
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 50c4475df6304e0cf12ea95217eb00ab5d572e34
Component: engine
2017-03-23 18:35:22 +01:00
30a11974ed Merge pull request #31930 from anusha-ragunathan/authz-disable
When authz plugin is disabled, remove from authz middleware chain.
Upstream-commit: bbce24997c7a31454edd1d3d979823582bcdd95d
Component: engine
2017-03-22 14:17:38 -07:00
2034662b7a When authz plugin is disabled, remove from authz middleware chain.
When the daemon is configured to run with an authorization-plugin and if
the plugin is disabled, the daemon continues to send API requests to the
plugin and expect it to respond. But the plugin has been disabled. As a
result, all API requests are blocked. Fix this behavior by removing the
disabled plugin from the authz middleware chain.

Tested using riyaz/authz-no-volume-plugin and observed that after
disabling the plugin, API request/response is functional.

Fixes #31836

Signed-off-by: Anusha Ragunathan <anusha.ragunathan@docker.com>
Upstream-commit: 38de272bd4dfea945985b7031cd353ac5f6507c5
Component: engine
2017-03-22 12:07:39 -07:00
dbaf00790d Merge pull request #31669 from tonistiigi/files-filter
Fix inefficient file paths filter
Upstream-commit: 2422d5ad35345e0ab24d3f22b96c1271f7c1e07d
Component: engine
2017-03-20 17:43:47 +01:00
600635fabb Add Johannes Kepler and Mary Jackson to name generator
Signed-off-by: cooltoast <mpatel678@gmail.com>
Upstream-commit: 234b2203e576fa40236d388f79b5ccefd3558147
Component: engine
2017-03-17 20:36:12 -07:00
cf2a5afb08 pkg/archive/diff.go: avoid redundant options init
Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com>
Upstream-commit: 5957dc489958384c6fc8c997590967922ab9aefa
Component: engine
2017-03-15 18:03:33 +02:00
5e15ee9c6f Fix default socket group regression
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: c7c2cd4e8e9c0fe03e8e9f343867c2fb5568ca1d
Component: engine
2017-03-14 16:09:08 -07:00
97318c100a Fix stringer in Result (pkg\testutil\cmd)
Signed-off-by: John Howard (VM) <jhoward@ntdev.microsoft.com>
Upstream-commit: f577131d3bc49860f615c458e44fc035b3708415
Component: engine
2017-03-13 08:40:31 -07:00
ce7091af99 pkg/system: Set appropriate CFLAGS on Solaris
The cgo in `meminfo_solaris.go` initializes variables in for loops, and
therefore requires a `-std=c99` `CFLAG` in order to compile (at least on
modern SmartOS).

Signed-off-by: James Nugent <james@jen20.com>
Upstream-commit: 4683f588ce893f3156ecfa63bfd16ebda1d09157
Component: engine
2017-03-09 13:40:05 -05:00
aec1003d24 Fix inefficient file paths filter
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: adeb3e36840c6d9d1912dd78f5300ae74d11c068
Component: engine
2017-03-08 18:59:25 -08:00
8d9c7cbbe3 Merge pull request #30733 from yongtang/02022017-formatter-header
Allow `--format` to use different delim in `table` format
Upstream-commit: 9369acc776be47eb4163ee97153aefa0a4e647a0
Component: engine
2017-03-03 11:25:19 -08:00
56417c3da5 Merge pull request #30729 from dmcgowan/update-go-connections
Update go-connections package
Upstream-commit: d8b0d2b9e9e3d4b2537a2ebbbb8f6187ea755286
Component: engine
2017-03-01 18:24:32 -08:00
b785b21a18 Improve coverage of pkg/ioutils/buffer
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 392ece22398e7757d2bfdce57ef645ab5e92aa20
Component: engine
2017-02-28 14:11:15 +01:00
4dd2c604b6 Update copyright dates
Signed-off-by: phineas <phin@phineas.io>
Upstream-commit: da8cf590eb56343f70d545c298a59d28f90eaf0f
Component: engine
2017-02-24 19:41:59 +00:00
7cb213f3ce Merge pull request #30416 from stevenh/linux-mount-fixes
Fix linux mount calls not applying propagation type changes
Upstream-commit: d52350d6623aa01bb846fc17ddbc209feafe1c14
Component: engine
2017-02-15 14:10:54 -08:00