Commit Graph

1138 Commits

Author SHA1 Message Date
Gaetan de Villele fb413981d3 add Makefiles and document their use in the README
Signed-off-by: Gaetan de Villele <gdevillele@gmail.com>
2017-04-25 09:57:06 -07:00
Gaetan 0f0b500cf3 Merge pull request #5 from gdevillele/add-gitignore
add gitignore file
2017-04-25 09:47:56 -07:00
Vincent Demeester a01a35fb84 Merge pull request #6 from aduermael/fix-path
fix docker/docker/cli path in comment
2017-04-25 09:33:17 +02:00
Adrien Duermael 763802b6a3 fix docker/docker/cli path in comment
Signed-off-by: Adrien Duermael <adrien@duermael.com>
2017-04-24 11:31:08 -07:00
Daniel Nephin bbee80a62e Merge pull request #1 from dnephin/add-dockerfile
Add Dockerfile and fix vendor.conf
2017-04-21 13:19:54 -04:00
Gaetan de Villele acf4eab87b add gitignore file
Signed-off-by: Gaetan de Villele <gdevillele@gmail.com>
2017-04-21 11:49:00 -05:00
Daniel Nephin b6cba06801 Add a Dockerfile for building and testing.
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2017-04-18 19:12:24 -04:00
Daniel Nephin 31c8672805 Update vendor.conf
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2017-04-18 18:35:14 -04:00
Daniel Nephin 6686ada6a4 Add vendor
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-04-17 18:12:58 -04:00
Daniel Nephin 10641c2aae Update imports.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-04-17 18:07:56 -04:00
Daniel Nephin f2559aa2e0 Add project files
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-04-17 17:49:33 -04:00
Daniel Nephin cdd7bc516b Import docker/docker/cmd/docker
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2017-04-17 17:44:40 -04:00
Daniel Nephin e8a454d8a6 Import docker/docker/client
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2017-04-17 17:41:20 -04:00
Daniel Nephin 1630fc40f8 Import docker/docker/cli
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2017-04-17 17:40:59 -04:00
Daniel Nephin 1302228707 init
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2017-04-17 17:40:37 -04:00
Vincent Demeester e5b7b7e87b Fix formatter unit test (moving to testify)
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2017-04-17 17:32:52 +02:00
Daniel Nephin 31639e04ce Merge pull request #32614 from aaronlehmann/testify
Remove pkg/testutil/assert in favor of testify
2017-04-17 11:07:08 -04:00
Sebastiaan van Stijn 1d73df5fc2 Merge pull request #30962 from TheHipbot/30431-implement-format-for-history-with-docs
30431 implement format for history with docs
2017-04-16 10:34:41 -07:00
Aaron Lehmann 6029def4cb 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>
2017-04-14 12:03:21 -07:00
Aaron Lehmann 50e74272d1 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>
2017-04-14 12:03:21 -07:00
Aaron Lehmann 7059a96e2e 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>
2017-04-14 12:03:21 -07:00
Aaron Lehmann 5b855515e4 Hide zero-valued timestamps from service JSON
It was possible to see output like this:

        "UpdateStatus": {
            "State": "updating",
            "StartedAt": "2017-04-14T17:10:03.226607162Z",
            "CompletedAt": "1970-01-01T00:00:00Z",
            "Message": "update in progress"
        }

The timestamp fields were already changed to pointers, and left nil if
the timestamp value was zero. However the zero-value of a timestamp from
gRPC is different from the value Go considers to be zero. gRPC uses the
Unix epoch instead of Go's epoch. Therefore, check that the timestamp
does not match the Unix epoch.

Also, add " ago" to the timestamps as shown in "docker service inspect
--pretty", as they are shown as relative times.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2017-04-14 10:44:24 -07:00
Sebastiaan van Stijn 1601dbe620 Merge pull request #31482 from ripcurld0/add_format_to_system_df
Add format to the docker system df command
2017-04-13 10:08:11 -07:00
Anusha Ragunathan 5084e4d6b4 Merge pull request #28923 from erikh/fix-copy
Fix copy API (`docker cp`, etc) uid/gid handling
2017-04-12 08:21:17 -07:00
Anusha Ragunathan 384e8e39e1 Merge pull request #28923 from erikh/fix-copy
Fix copy API (`docker cp`, etc) uid/gid handling
2017-04-12 08:21:17 -07:00
Erik Hollensbe f77e2d15d7 daemon/archive.go: Fix copy routines to preserve UID.
This changes the long-standing bug of copy operations not preserving the
UID/GID information after the files arrive to the container.

Signed-off-by: Erik Hollensbe <github@hollensbe.org>
2017-04-12 10:33:19 +00:00
Erik Hollensbe 7a767a1a7e daemon/archive.go: Fix copy routines to preserve UID.
This changes the long-standing bug of copy operations not preserving the
UID/GID information after the files arrive to the container.

Signed-off-by: Erik Hollensbe <github@hollensbe.org>
2017-04-12 10:33:19 +00:00
Anusha Ragunathan abaaa82400 Merge pull request #32030 from ehazlett/any-runtime
Support Swarmkit Generic Task Runtime
2017-04-11 17:53:20 -07:00
Aaron Lehmann d857c869d2 client: Allow hex strings as source references for ImageTag
The source of a tag operation is allowed to be a 64-character hex
string. This means it should use ParseAnyReference for validation
instead of ParseNormalizedNamed.

This fixes a regression that happened in 17.04.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2017-04-11 13:37:04 -07:00
Vincent Demeester c3cf029a49 Merge pull request #32059 from seriousben/support-dns-stack-file
add support for dns nameservers and search domains in stack files
2017-04-11 21:32:52 +02:00
Evan Hazlett 58e69bfd5a updates for review comments
- runtimeUrl -> type_url
- runtimes -> runtime

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2017-04-11 14:02:01 -04:00
Evan Hazlett 06a91d315c filter services by runtime; default to container
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2017-04-11 14:02:01 -04:00
Sebastiaan van Stijn f3eacf2983 Merge pull request #32284 from aaronlehmann/fix-service-defaults
Improve default handling for "service create"
2017-04-11 13:06:53 +02:00
Sebastiaan van Stijn 35fc4e4ef3 Merge pull request #32284 from aaronlehmann/fix-service-defaults
Improve default handling for "service create"
2017-04-11 13:06:53 +02:00
Victor Vieux f2b5c1e4c6 Merge pull request #32496 from tonistiigi/build-target
builder: add an option for specifying build target
2017-04-10 19:02:21 -07:00
Victor Vieux 7a0d2dbcc2 Merge pull request #32462 from dperny/service-logs-general-availability
Remove experimental from service logs
2017-04-10 18:30:20 -07:00
Victor Vieux 988d88530b Merge pull request #32110 from adshmh/30977-stack-rm-should-accept-multiple-labels
stack rm should accept multiple arguments
2017-04-10 18:19:59 -07:00
Benjamin Boudreau 2e126a52f2 Adding support for dns in stack files
Signed-off-by: Benjamin Boudreau <boudreau.benjamin@gmail.com>
2017-04-10 20:46:33 -04:00
Tonis Tiigi 6dc427fb61 builder: add an option for specifying build target
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-04-10 16:21:43 -07:00
Tonis Tiigi ae43081d1d builder: add an option for specifying build target
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-04-10 16:21:43 -07:00
Sebastiaan van Stijn d8dee941c1 Merge pull request #32116 from mkumatag/inspect_template
Adopt text/template in node inspect
2017-04-10 23:02:26 +02:00
Aaron Lehmann d0e8fe18fc Make the CLI show defaults from the swarmkit defaults package
If no fields related to an update config or restart policy are
specified, these structs should not be created as part of the service,
to avoid hardcoding the current defaults.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2017-04-10 13:41:18 -07:00
Aaron Lehmann 07f55b2eb5 Change "service inspect" to show defaults in place of empty fields
This adds a new parameter insertDefaults to /services/{id}. When this is
set, an empty field (such as UpdateConfig) will be populated with
default values in the API response. Make "service inspect" use this, so
that empty fields do not result in missing information when inspecting a
service.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2017-04-10 13:41:16 -07:00
Aaron Lehmann e62ea2e54d Change "service inspect" to show defaults in place of empty fields
This adds a new parameter insertDefaults to /services/{id}. When this is
set, an empty field (such as UpdateConfig) will be populated with
default values in the API response. Make "service inspect" use this, so
that empty fields do not result in missing information when inspecting a
service.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2017-04-10 13:41:16 -07:00
Drew Erny a29c0a6418 Remove experimental from service logs
Service logs API is now stable. Service logs now support all features,
except retrieving details provided to the log driver.

Signed-off-by: Drew Erny <drew.erny@docker.com>
2017-04-10 13:40:45 -07:00
Vincent Demeester eddc5b9d9e Merge pull request #31236 from tonistiigi/docker-stdin
build: accept -f - to read Dockerfile from stdin
2017-04-10 20:14:54 +02:00
Sebastiaan van Stijn 3524ac8f76 Merge pull request #31148 from yongtang/31032-NanoCPU-update
Add `--cpus` support for `docker update`
2017-04-10 20:02:15 +02:00
Vincent Demeester 3ac3a56f1c Merge pull request #30740 from yongtang/29999-prune-filter-label
Add `label` filter for `docker system prune`
2017-04-10 19:38:01 +02:00
Vincent Demeester ec9d4dbdc6 Merge pull request #30740 from yongtang/29999-prune-filter-label
Add `label` filter for `docker system prune`
2017-04-10 19:38:01 +02:00
Daniel Nephin 22c1cbe611 Merge pull request #32427 from adshmh/add-unit-tests-to-cli-command-idresolver-package
Added unit tests to the cli/command/idresolver package
2017-04-10 12:41:09 -04:00