Commit graph

1030 commits

Author SHA1 Message Date
David Calavera
723be0a332 Merge pull request #18888 from calavera/event_types
Event all the things!
2016-01-04 13:07:33 -08:00
David Calavera
851fe00c64 Add filter by event type and documentation.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2016-01-04 14:58:04 -05:00
Daniel Nephin
0007f5a859 Move some validators from opts to runconfig/opts.
These validators are only used by runconfig.Parse() or some other part of the
client, so move them into the client-side package.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-01-04 14:35:36 -05:00
David Calavera
dc4ca0e897 Merge pull request #18941 from dnephin/runconfig_in_cli
Move runconfig/parse.go into the runconfig/opts package
2016-01-04 11:06:18 -08:00
David Calavera
9961816ade Remove version package from API types.
It's an internal type that only extends string.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2016-01-04 12:51:45 -05:00
Daniel Nephin
2b7ad47bd2 Move the runconfig.Parse() function into the runconfig/opts package.
The parse.go file is used almost exclusively in the client. The few small
functions that are used outside of the client could easily be copied out
when the client is extracted, allowing this runconfig/opts package to
move to the client.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-01-04 12:06:29 -05:00
Daniel Nephin
4c0d586bd3 Move ParseExec to the client where it is used.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-01-04 12:06:29 -05:00
Sebastiaan van Stijn
db738dd77f Merge pull request #15666 from vdemeester/3519-configurable-escape
Implement configurable escape key for attach/exec
2016-01-04 00:49:07 +01:00
Vincent Demeester
15aa2a663b Implement configurable detach key
Implement configurable detach keys (for `attach`, exec`, `run` and
`start`) using the client-side configuration

- Adds a `--detach-keys` flag to `attach`, `exec`, `run` and `start`
  commands.
- Adds a new configuration field (in `~/.docker/config.json`) to
  configure the default escape keys for docker client.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-01-03 23:03:39 +01:00
Vincent Demeester
3544d48ca1 Merge pull request #19019 from duglin/constScratch
Use constant instead of "scratch"
2016-01-01 21:02:41 +01:00
Brian Goff
e7e3e568d1 Merge pull request #18836 from vdemeester/18829-info-authz-plugins
Add authorization plugins to docker info
2015-12-31 09:47:59 -05:00
Doug Davis
e6806223e8 Use constant instead of "scratch"
Move NoBaseImageSpecifier to a common spot and then use it instead of
"scratch" in a couple of places.

Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-12-31 06:21:56 -08:00
David Calavera
72f1881df1 Add event types.
- Stop serializing JSONMessage in favor of events.Message.
- Keep backwards compatibility with JSONMessage for container events.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-30 17:39:33 -05:00
Sebastiaan van Stijn
2c3d1a9b12 Merge pull request #18964 from hqhq/hq_fix_memory_swap_doc2
Fix docs for memory-swap
2015-12-30 21:01:48 +01:00
Qiang Huang
c68a483e44 Fix docs for memory-swap
Fixes: #18894

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2015-12-30 09:23:35 +08:00
David Calavera
8e034802b7 Remove usage of pkg sockets and tlsconfig.
- Use the ones provided by docker/go-connections, they are a drop in replacement.
- Remove pkg/sockets from docker.
- Keep pkg/tlsconfig because libnetwork still needs it and there is a
  circular dependency issue.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-29 19:27:12 -05:00
Vincent Demeester
4a1eb3f3e2 Add authorization plugins to docker info
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2015-12-29 22:10:23 +01:00
Qiang Huang
e0dc4f27f6 Remove redundant error messages
For operations on multi containers, we printed error for each
failed container, then printed an extra message for container
names, it seems redundant.

Addresses comments:
https://github.com/docker/docker/pull/15078#discussion_r47988449

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2015-12-29 22:03:39 +08:00
Vincent Demeester
6cd167386b Merge pull request #18835 from dnephin/move_validate_context_dir
Move utils.ValidateContextDirectory to the one package that uses it
2015-12-28 22:06:13 +01:00
Daniel Nephin
9e19b4839f Move ValidateContextDirectory to the one package that uses it.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2015-12-28 11:22:39 -05:00
Qiang Huang
8799c4fc0f Implemet docker update command
It's used for updating properties of one or more containers, we only
support resource configs for now. It can be extended in the future.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2015-12-28 19:19:26 +08:00
Antonio Murdaca
b0be88c111 Merge pull request #18878 from calavera/conditional_load_response
Make `docker load` to output json when the response content type is json.
2015-12-24 01:11:54 +01:00
Daniel Nephin
5adbea7075 Move ulimit options to runconfig opts
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2015-12-23 13:27:58 -05:00
Zhang Wei
26dd026bd7 Add filter for network ls to hide predefined net
Add filter support for `network ls` to hide predefined network,
then user can use "docker network rm `docker network ls -f type=custom`"
to delete a bundle of userdefined networks.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
2015-12-23 13:26:40 +08:00
David Calavera
9fd2c0feb0 Make docker load to output json when the response content type is json.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-22 19:00:27 -05:00
David Calavera
7ac4232e70 Move Config and HostConfig from runconfig to types/container.
- Make the API client library completely standalone.
- Move windows partition isolation detection to the client, so the
  driver doesn't use external types.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-22 13:34:30 -05:00
David Calavera
747dccde41 Remove usage of runconfig.ConvertKVStringsToMap in the API client library.
It's a very simple function that we can duplicate.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-22 13:31:46 -05:00
David Calavera
839f73c302 Move ExecConfig to types.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-22 13:31:46 -05:00
David Calavera
056e744903 Replace usage of pkg/nat with go-connections/nat.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-22 13:31:46 -05:00
Alexander Morozov
1a8e8f2967 Merge pull request #18830 from calavera/tls_verify_godoc
Add godoc comment about client tls verification.
2015-12-21 10:02:32 -08:00
Alexander Morozov
42460b6772 Merge pull request #17692 from vdemeester/images-format
Add --format support to images command
2015-12-21 09:57:29 -08:00
David Calavera
4e2c0f385c Add godoc comment about client tls verification.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-21 12:55:37 -05:00
Vincent Demeester
34a3c3cacf Add --format support to images command
- rename `api/client/ps` to `api/client/formatter`
- add a a image formatter

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2015-12-21 17:38:07 +01:00
Boaz Shuster
60b4db7eb1 Change the quiet flag behavior in the build command
Right now, the quiet (-q, --quiet) flag ignores the output
generated from within the container.

However, it ought to be quiet in a way that all kind
of diagnostic output should be ignored, unless the build
process fails.

This patch makes the quiet flag behave in the following way:
 1. If the build process succeeds, stdout contains the image ID
    and stderr is empty.
 2. If the build process fails, stdout is empty and stderr
    has the error message and the diagnostic output of that process.

If the quiet flag is not set, then everything goes to stdout
and error messages, if there are any, go to stderr.

Signed-off-by: Boaz Shuster <ripcurld.github@gmail.com>
2015-12-21 16:38:50 +02:00
Vincent Demeester
bb853137be Fix the api/client/ps unit tests.
TestFormat was depending on the time so (comparing again
1970-01-01).. at some point it was bounded to fail >_<. Updating it to
be *not* time-dependent :).

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2015-12-21 11:07:14 +01:00
Doug Davis
7ff61dd592 Merge pull request #18779 from aditirajagopal/18750-new-string-method
pkg/version.Version: use the new String() method
2015-12-18 21:21:17 -05:00
Alexander Morozov
58ebc71272 Merge pull request #18763 from calavera/fix_raw_inspect
Print the raw inspected elements when there is no template for `docker inspect`.
2015-12-18 15:25:38 -08:00
Aditi Rajagopal
278e75800c pkg/version.Version: use the new String() method
Resolves #18750

Signed-off-by: Aditi Rajagopal <arajagopal@us.ibm.com>
2015-12-18 15:29:32 -05:00
David Calavera
1f5674363e Print the raw inspected elements when there is no template for docker inspect.
Otherwise we're ignoring the fields that Swarm adds to the output.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-17 23:17:52 -05:00
David Calavera
defd1519f7 Remove api client lib dependency on tlsconfig and sockets packages.
- Let consumers to configure the http transport initially and apply or
  defaults on top.
- Add function to initialize a new client based on environment
  variables, useful for integrators.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-17 19:04:49 -05:00
David Calavera
905f3336b2 Merge pull request #15964 from duglin/APIVersion
Add a DOCKER_API_VERSION env var
2015-12-16 14:23:47 -08:00
Tonis Tiigi
eeb2d4c1ad Clean up reference type switches
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2015-12-16 11:58:53 -08:00
Tonis Tiigi
c1040b222c Remove unused repoinfo
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2015-12-16 11:58:52 -08:00
Tonis Tiigi
ffded61dad Update Named reference with validation of conversions
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2015-12-16 11:58:52 -08:00
Tonis Tiigi
2655954c2d Add own reference package wrapper
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2015-12-16 11:58:52 -08:00
David Calavera
b44b5bbc8b Merge pull request #18682 from calavera/replace_units_package
Replace pkg/units with docker/go-units.
2015-12-16 10:48:59 -08:00
David Calavera
4fef42ba20 Replace pkg/units with docker/go-units.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-16 12:26:49 -05:00
Antonio Murdaca
38f409d283 api: client: lib: fix go vet
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2015-12-16 12:00:48 +01:00
David Calavera
e98cae4919 Move filters package to the API.
These filters are only use to interchange data between clients and daemons.
They don't belong to the parsers package.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-15 18:13:26 -05:00
David Calavera
52fd30079a Merge pull request #18685 from calavera/remove_timeutils
Move timeutils functions to the only places where they are used.
2015-12-15 15:11:18 -08:00
David Calavera
7bb30e0aeb Merge pull request #18676 from dnephin/more_registry_types_to_api
Move registry.SearchResult types to api/types/registry
2015-12-15 12:00:24 -08:00
David Calavera
27220ecc6b Move timeutils functions to the only places where they are used.
- Move time json marshaling to the jsonlog package: this is a docker
  internal hack that we should not promote as a library.
- Move Timestamp encoding/decoding functions to the API types: This is
  only used there. It could be a standalone library but I don't this
it's worth having a separated repo for this. It could introduce more
complexity than it solves.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-15 14:56:14 -05:00
Jess Frazelle
adf1ffd53b Merge pull request #18416 from toli/disable-official-repo-check-in-push
Removing the restriction to push to an 'official' repo
2015-12-15 08:52:36 -08:00
Daniel Nephin
c4472b389d Move registry.SearchResult types to api/types/registry.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2015-12-15 11:44:20 -05:00
Arnaud Porterie
2ec34dca05 Merge pull request #18650 from calavera/remove_httputils_dep_from_api
Remove httputils dependency from API client lib.
2015-12-14 20:51:53 -08:00
Vincent Demeester
87740d001c Merge pull request #18644 from calavera/remove_timeout_func_dependency_from_api_lib
Remove timeout shared function.
2015-12-14 23:05:29 +01:00
David Calavera
83b5729f64 Remove httputils dependency from API client lib.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-14 16:48:59 -05:00
Doug Davis
6287ec9095 Add a DOCKER_API_VERSION env var
Closes: #11486

Just for @ahmetalpbalkan  :-)

Fixed some comment formatting too while in there.

Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-12-14 12:45:34 -08:00
David Calavera
75d69ce0da Merge pull request #18637 from dnephin/move_auth_config
Move more api types to api/types package
2015-12-14 11:53:30 -08:00
David Calavera
9dc7d07fc1 Remove timeout shared function.
Handle timeouts when it's necessary based on a Timeout interface.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-14 14:24:21 -05:00
David Calavera
b679eb9a82 Force API versioning in the client library.
Remove dependencies on docker's version packages.
Allow empty version as a fallback to latest version.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-14 12:06:42 -05:00
Daniel Nephin
96c10098ac Move IndexInfo and ServiceConfig types to api/types/registry/registry.go
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2015-12-14 11:28:02 -05:00
Tibor Vass
44299989b2 Merge pull request #18631 from tiborvass/cleanup-utils
Create `builder/dockerignore` and `pkg/gitutils` to clean up `utils`
2015-12-14 17:22:01 +01:00
Daniel Nephin
5b321e3287 Move AuthConfig to api/types
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2015-12-14 11:22:01 -05:00
toli
0d824c760e Removing the restriction to push to a 'official' repo
Signed-off-by: toli <toli@docker.com>
2015-12-14 07:45:00 -08:00
Vincent Demeester
5e0283effa Merge pull request #18618 from dnephin/refactor_resolve_auth_config
Refactor ResolveAuthConfig to remove the builder dependency on cli code
2015-12-14 15:23:36 +01:00
Tibor Vass
63e3816c1d utils: move dockerignore function to builder/dockerignore
Signed-off-by: Tibor Vass <tibor@docker.com>
2015-12-14 14:59:52 +01:00
Tibor Vass
135cca6f52 utils: move git functions to pkg/gitutils
Signed-off-by: Tibor Vass <tibor@docker.com>
2015-12-14 14:59:52 +01:00
Antonio Murdaca
5fd9a8f603 Merge pull request #18616 from calavera/move_client_version_to_docker_cli
Move client version to the docker cli.
2015-12-14 11:43:01 +01:00
Justas Brazauskas
927b334ebf Fix typos found across repository
Signed-off-by: Justas Brazauskas <brazauskasjustas@gmail.com>
2015-12-13 18:04:12 +02:00
Daniel Nephin
920ea13516 Refactor ResolveAuthConfig to remove the builder dependency on cli code.
registry.ResolveAuthConfig() only needs the AuthConfigs from the ConfigFile, so
this change passed just the AuthConfigs.

Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2015-12-11 19:31:24 -08:00
David Calavera
229d3bace8 Move client version to the docker cli.
This removes the dockerversion dependency from the client library.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-11 19:03:33 -05:00
David Calavera
91799c232e Merge pull request #18610 from runcom/fix-warn
api: client: info: add newline after warning
2015-12-11 13:41:14 -08:00
Antonio Murdaca
bb3d7e1e65 api: client: info: add newline after warning
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2015-12-11 20:54:51 +01:00
David Calavera
bc02d42d9e Make sure template inspector always prints a carriage return.
To match with the raw inspector.
Adds tests to verify its functionality.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-10 21:13:13 -05:00
Jess Frazelle
a16a1d75d9 Merge pull request #18564 from runcom/warn-on-loopback
api: client: info: print a warning if dm is using a loopback file
2015-12-11 10:11:03 +10:00
Alexander Morozov
ac453a310b Merge pull request #18353 from aaronlehmann/transfer-manager
Improved push and pull with upload manager and download manager
2015-12-10 14:52:48 -08:00
David Calavera
a0f80079b8 Merge pull request #18557 from cpuguy83/use_correct_resize_fn
Use correct fn for resizing TTY
2015-12-10 12:37:13 -08:00
Antonio Murdaca
a2c4c0cd3a api: client: info: print a warning if dm is using a loopback file
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2015-12-10 14:05:28 +01:00
Sebastiaan van Stijn
3d82564c7a Merge pull request #18562 from haoshuwei/modify-wordspelling-in-docker-stats
Modify word spelling  in stats.go's comments
2015-12-10 13:32:10 +01:00
Sebastiaan van Stijn
d46650b3c7 Merge pull request #18553 from calavera/remove_specific_go_1_5_calls
Remove call to template.Option when building with 1.4.
2015-12-10 09:28:00 +01:00
Shuwei Hao
413e058b72 Modify word spelling errors in stats.go
Signed-off-by: Shuwei Hao <haosw@cn.ibm.com>
2015-12-10 06:57:25 +00:00
Brian Goff
3260ddb10b Use correct fn for resizing TTY
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2015-12-09 22:55:01 -05:00
Aaron Lehmann
572ce80230 Improved push and pull with upload manager and download manager
This commit adds a transfer manager which deduplicates and schedules
transfers, and also an upload manager and download manager that build on
top of the transfer manager to provide high-level interfaces for uploads
and downloads. The push and pull code is modified to use these building
blocks.

Some benefits of the changes:

- Simplification of push/pull code
- Pushes can upload layers concurrently
- Failed downloads and uploads are retried after backoff delays
- Cancellation is supported, but individual transfers will only be
  cancelled if all pushes or pulls using them are cancelled.
- The distribution code is decoupled from Docker Engine packages and API
  conventions (i.e. streamformatter), which will make it easier to split
  out.

This commit also includes unit tests for the new distribution/xfer
package. The tests cover 87.8% of the statements in the package.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2015-12-09 19:13:35 -08:00
David Calavera
6df3fc5175 Remove call to template.Option when building with 1.4.
Windows still relies on 1.4.2 to build Docker.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 17:30:16 -05:00
Daniel Nephin
efda9618db Move networking api types to the api/types/networking package.
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2015-12-09 13:55:59 -08:00
David Calavera
2ec468e284 Make the commit configuration to be a typed struct rather than accepting a string.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:06:58 -05:00
David Calavera
57b6796304 Implement all inspect commands with the new inspector interface.
It makes the behavior completely consistent across commands.
It adds tests to check that execution stops when an element is not
found.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:05:01 -05:00
David Calavera
5a0a6ee9cd Remove old http from the docker cli.
Everything has been ported to the client library 🎉

Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:05:00 -05:00
David Calavera
e4abf48567 Implement docker search with standalone client lib.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:05:00 -05:00
David Calavera
d1057e4c46 Implement docker resize with standalone client lib.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:05:00 -05:00
David Calavera
cf3efd05d4 Implement docker inspect with standalone client lib.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:05:00 -05:00
David Calavera
42670e30ee Implement docker push with standalone client lib.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:05:00 -05:00
David Calavera
e78f02c4db Implement docker pull with standalone client lib.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:05:00 -05:00
David Calavera
e59d54bd99 Implement docker stats with standalone client lib.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:05:00 -05:00
David Calavera
3f9f23114f Implement docker exec with standalone client lib.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:04:59 -05:00
David Calavera
bcb848c87f Implement docker run with standalone client lib.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:04:59 -05:00
David Calavera
962b2d8b9b Implement docker start with standalone client lib.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:04:59 -05:00
David Calavera
5e80ac9c84 Implement docker attach with standalone client lib.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:04:59 -05:00
David Calavera
d9a62c5f2b Lowercase http method functions.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:04:59 -05:00
David Calavera
0b0431a856 Change references to query values.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:04:59 -05:00
David Calavera
8b15839ee8 Create interface that clients that talk to the api must fulfill.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:04:58 -05:00
David Calavera
a413be3392 Fix client lib errors documentation.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:04:58 -05:00
David Calavera
73bca058ae Implement docker volume with standalone client lib.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:04:58 -05:00
David Calavera
8c9c9e137c Use ensureReaderClosed consistently to close a response body reader.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:04:58 -05:00
David Calavera
7df71ca31d Implement getExitCode with standalone client lib.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:04:58 -05:00
David Calavera
51efb1480a Implement docker wait with standalone client lib.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:04:58 -05:00
David Calavera
1fe912151b Implement docker version with standalone client lib.
Use Go template definitions for default format.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:04:58 -05:00
David Calavera
b8be62e28e Implement docker unpause with standalone client lib.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:04:57 -05:00
David Calavera
d78ce02f88 Implement trusted tagging with standalone client lib.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:04:57 -05:00
David Calavera
7573c153c5 Implement docker top with standalone client lib.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:04:57 -05:00
David Calavera
21ffdf0e0e Implement docker tag with standalone client lib.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:04:57 -05:00
David Calavera
9ec1cf92f5 Implement docker stop with standalone client lib.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:04:57 -05:00
David Calavera
373f55eecd Implement docker save with standalone client lib.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:04:56 -05:00
David Calavera
37d6fee8cf Implement docker rmi with standalone client lib.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:04:56 -05:00
David Calavera
fb6533e6cf Implement docker remove with standalone client lib.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:04:56 -05:00
David Calavera
b7de53634c Implement docker restart with standalone client lib.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:04:56 -05:00
David Calavera
ac8fb77c74 Implement container rename with standalone client lib.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:04:56 -05:00
David Calavera
d05aa418b0 Implement docker ps with standanlone client lib.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:04:56 -05:00
David Calavera
eeee2eae86 Implement docker port with standalone client lib.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:04:56 -05:00
David Calavera
55333e8f90 Implement docker pause with standalone client lib.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:04:56 -05:00
David Calavera
356768bc01 Implement docker network with standalone client lib.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:04:55 -05:00
David Calavera
0876742646 Implement docker logs with standalone client lib.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:04:55 -05:00
David Calavera
b36531db60 Implement docker login with standalone client lib.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:04:55 -05:00
David Calavera
9073a52ea8 Implement docker load with standalone client lib.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:04:55 -05:00
David Calavera
c57e62d00e Implement docker kill with standalone client lib.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:04:55 -05:00
David Calavera
535c4c9a59 Implement docker build with standalone client lib.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:04:55 -05:00
David Calavera
900ad2897f Implement docker info with standalone client lib.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:04:54 -05:00
David Calavera
6bf757500b Implement docker import with the standalone client lib.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:04:54 -05:00
David Calavera
381262fbea Implement docker images with the standalone client lib.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:04:54 -05:00
David Calavera
45eca43f5b Implement docker history with the standalone client lib.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:04:54 -05:00
David Calavera
e0549b8ceb Implement docker export with standalone client lib.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:04:54 -05:00
David Calavera
11c4cc9dde Implement docker events with standalone client lib.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:04:54 -05:00
David Calavera
e562ac42f4 Implement docker diff with standalone client lib.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:04:53 -05:00
David Calavera
136e8fef64 Implement docker container create with standalone client lib.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:04:53 -05:00
David Calavera
1698fe01f5 Implement docker image create with standalone client lib.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:04:53 -05:00
David Calavera
1b2b91ba43 Implement docker cp with standalone client lib.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:04:53 -05:00
David Calavera
8c9ad7b818 Implement docker commit with standalone client lib.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:04:53 -05:00
David Calavera
589df17a1a Extract API client struct as standalone client.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:04:53 -05:00
Tibor Vass
1f8efc687c Merge pull request #18123 from aidanhs/aphs-fail-on-broken-tar
Ensure adding a broken tar doesn't silently fail
2015-12-07 14:38:21 +01:00
Doug Davis
2ecbc9774b Merge pull request #18463 from haoshuwei/modify-containerinspect-tocheckstatuscode
Modify docker inspect client to check statusCode instead of strings c…
2015-12-07 07:55:26 -05:00
Shuwei Hao
6306eb3cd3 Modify docker network inspect client to check statusCode instead of string contain
Signed-off-by: Shuwei Hao <haoshuwei24@gmail.com>
2015-12-07 10:11:46 +00:00
Shuwei Hao
e719c9225c Modufy docker inspect client to check statusCode instead of strings contains
Signed-off-by: Shuwei Hao <haosw@cn.ibm.com>
2015-12-07 10:03:46 +00:00
Sebastiaan van Stijn
5b4734aaa5 Merge pull request #17788 from haoshuwei/modify-volume-inspect-multi
Modify docker volume inspect to return existed volumes and the names of the unexsited volumes
2015-12-06 14:03:46 +01:00
David Calavera
29c69ce2a9 Merge pull request #18374 from calavera/volume_inspect_exit
Return error code when `volume inspect` fails with a template.
2015-12-03 13:31:47 -08:00
Phil Estes
4d849619d4 Merge pull request #17481 from vdemeester/17446-network-inspect-format
Add format flag to network inspect
2015-12-03 16:16:04 -05:00
David Calavera
b9d30280f6 Return error code when volume inspect fails with a template.
Following `docker inspect` conventions:

- Keep partial info in a buffer to not print incomplete template outputs.
- Break execution when template parsing or decoding fail.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-03 13:22:55 -05:00
Tibor Vass
33ab2bb52c Merge pull request #18266 from calavera/events_pub_sub
Event PubSub topics + linear filtering.
2015-12-03 17:11:40 +01:00
Vincent Demeester
295c27388d Add format flag to network inspect
…for consistency as docker inspect and docker volume inspect supports it too

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2015-12-02 22:32:10 +01:00
Sebastiaan van Stijn
6deec021e5 Merge pull request #18309 from WeiZhang555/time
Consolidate time format for API
2015-12-02 22:28:28 +01:00
David Calavera
93d1dd8036 Make filtering a linear operation.
Improves the current filtering implementation complixity.
Currently, the best case is O(N) and worst case O(N^2) for key-value filtering.
In the new implementation, the best case is O(1) and worst case O(N), again for key-value filtering.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-02 11:12:42 -05:00
Zhang Wei
9daca1222a Consolidate time format for API
Consolidate all the API to same time format: RFC3339, and it will be
client's responsibility to present it in more user friendly way.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
2015-12-02 22:40:18 +08:00
Doug Davis
8d4fe141c4 Deprecate -f flag from docker tag
Closes #9798

@maintainers please note that this is a change to the UX. We no longer
require the -f flag on `docker tag` to move a tag from an existing image.
However, this does make us more consistent across our commands,
see https://github.com/docker/docker/issues/9798 for the history.

Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-12-01 19:53:49 -08:00
Antonio Murdaca
ef1d410b02 fix shm size handling
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2015-12-01 16:29:40 +01:00
Shuwei Hao
6295345005 Modify docker volume inspect to return existed volumes
Signed-off-by: Shuwei Hao <haoshuwei24@gmail.com>
2015-12-01 01:43:02 +00:00
Tonis Tiigi
4352da7803 Update daemon and docker core to use new content addressable storage
Add distribution package for managing pulls and pushes. This is based on
the old code in the graph package, with major changes to work with the
new image/layer model.

Add v1 migration code.

Update registry, api/*, and daemon packages to use the reference
package's types where applicable.

Update daemon package to use image/layer/tag stores instead of the graph
package

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2015-11-24 09:40:25 -08:00
David Calavera
aa22191093 Merge pull request #17356 from HuKeping/warn-on-oom
Warning out when disalbe oom killer but not set the memory limit
2015-11-23 12:43:04 -08:00
Doug Davis
a70079ea23 Add more to tag's -f flag's help
Was noticed in #9798

Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-11-23 07:20:10 -08:00
Aidan Hobson Sayers
3243e504d0 Ensure adding a broken tar doesn't silently fail
Signed-off-by: Aidan Hobson Sayers <aidanhs@cantab.net>
2015-11-23 14:18:58 +00:00
Vincent Demeester
a600bf4eab Merge pull request #17489 from WeiZhang555/network-rm-multi
Enhance `docker network rm` to delete multi net
2015-11-23 08:25:33 +01:00
Zhang Wei
e7eb6687ef Enhance docker network rm to delete multi net
This commit enhance `docker network rm` command to allow user to delete
multi networks at the same time.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
2015-11-22 05:37:00 +08:00
Antonio Murdaca
3ff9bb5332 Merge pull request #16613 from WeiZhang555/docker-cp-symlink
Add option `-L` to allow `docker cp` follow symbol link
2015-11-21 17:03:24 +01:00
Antonio Murdaca
6653f82796 Merge pull request #17495 from mikebrow/docker-tz-and-nanosecond-updates
modifying docker --since and --until to support nanoseconds and time …
2015-11-20 23:37:44 +01:00
David Calavera
8fa09749fb Merge pull request #17718 from wenchma/17716_before_filter_doc
Re-implement --before and --since as options for --filter
2015-11-20 11:24:19 -08:00
Zhang Wei
92600bdec1 Add '-L' option for cp
Fixes #16555

Original docker `cp` always copy symbol link itself instead of target,
now we provide '-L' option to allow docker to follow symbol link to real
target.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
2015-11-21 00:36:56 +08:00
Wen Cheng Ma
1921c62938 Re-implement --before and --since as options for --filter
* This commit will mark --before and --since as deprecated, but leave their behavior
  unchanged until they are removed, then re-implement them as options for --filter.

* And update the related docs.

* Update the integration tests.

Fixes issue #17716

Signed-off-by: Wen Cheng Ma <wenchma@cn.ibm.com>
2015-11-20 13:10:13 +08:00
NIWA Hideyuki
5aeaf2a0c4 Addition of "--shm-size" to which size of /dev/shm is changed.
- Optional "--shm-size=" was added to the sub-command(run, create,and build).
- The size of /dev/shm in the container can be changed
  when container is made.
- Being able to specify is a numerical value that applies number,
  b, k, m, and g.
- The default value is 64MB, when this option is not set.
- It deals with both native and lxc drivers.

Signed-off-by: NIWA Hideyuki <niwa.hiedyuki@jp.fujitsu.com>
2015-11-20 09:24:18 +09:00
Michael Crosby
104dab87ea Merge pull request #17478 from vdemeester/pr-13921
Carry#13921 : Expand /info: Expose OSType (GOOS), Architecture (GOARCH)
2015-11-17 15:44:57 -08:00
Alexander Morozov
f18d5da6a7 Merge pull request #17300 from kunalkushwaha/plugin-info
Patch for Plugin drivers in docker info
2015-11-17 10:46:29 -08:00
David Calavera
d507acb175 Merge pull request #17724 from runcom/remove-depreciated-cli-flags
Remove depreciated cli flags
2015-11-17 16:40:06 +01:00
Sebastiaan van Stijn
7c5cdda74e Merge pull request #17604 from RyanDeng/fix_cpuPercent_extremelyHigh
fix the bug: cpu percent will extremely high
2015-11-16 17:26:29 +01:00
Kunal Kushwaha
aa7fd884e6 Supported added for reterving Plugin list for Network and Volume.
Also, plugin information in docker info output.

Signed-off-by: Kunal Kushwaha <kushwaha_kunal_v7@lab.ntt.co.jp>
2015-11-16 15:28:09 +09:00
Antonio Murdaca
7929888214 Remove deprecated cli flags
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2015-11-15 10:40:01 +01:00
Olle Jonsson
4e8fcd4002 /info: Add keys Architecture, OSType
- introduces Swarm-relevant keys, see #13634
  - docs updated

Signed-off-by: Olle Jonsson <olle.jonsson@gmail.com>
2015-11-14 22:21:45 +01:00
Antonio Murdaca
ad8a66573c Merge pull request #17851 from Microsoft/10662-ArgumentEscaping
Prevent double escaping of Dockerfile commands on Windows
2015-11-14 17:25:53 +01:00
Jessica Frazelle
94ea6af8cd
update vendor.sh and notary api for vendored changes
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
2015-11-13 13:19:11 -08:00
Darren Stahl
9db5db1b94 This fixes the case where arguments are escaped twice from Dockerfiles on
Windows

Signed-off-by: Darren Stahl <darst@microsoft.com>
2015-11-13 10:43:06 -08:00
Alexander Morozov
cccf674943 Merge pull request #16873 from coolljt0725/expand_docker_info
Add more cgroup config to docker info
2015-11-13 09:37:06 -08:00
Mike Brown
430d8ff611 modifying docker --since and --until to support nanoseconds and time zones
Signed-off-by: Mike Brown <brownwm@us.ibm.com>
2015-11-13 09:56:15 -06:00
David Calavera
58b270c338 Merge pull request #17431 from vdemeester/hope-it-does-not-broke-everything-again
Another try at dockerversion placeholder for library import
2015-11-09 13:15:50 -08:00
Vincent Demeester
8054a30387 dockerversion placeholder for library import
- Add a *version* file placeholder.
- Update autogen and builds to use it and an autogen build flag

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2015-11-09 19:32:46 +01:00
Sebastiaan van Stijn
fdc8cce070 Merge pull request #16742 from runcom/10772-docker-stats-all
Allow docker stats without arguments
2015-11-07 19:41:03 +00:00
Antonio Murdaca
ae818a820f Allow docker stats without arguments
This patch adds the ability to run `docker stats` w/o arguments and get
statistics for all running containers by default. Also add a new
`--all` flag to list statistics for all containers (like `docker ps`).
New running containers are added to the list as they show up also.
Add integration tests for this new behavior.
Docs updated accordingly. Fix missing stuff in man/commandline
reference for `docker stats`.

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2015-11-07 17:03:33 +01:00
David Calavera
f198334400 Merge pull request #17738 from Microsoft/jjh/login
Windows: [TP4] Fix docker login
2015-11-06 15:02:42 -08:00
Alexander Morozov
e37e329074 Return nice client-side message for docker logs
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-11-06 11:40:48 -08:00
John Howard
9c765040a5 Windows: Fix docker login
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-11-05 14:19:48 -08:00
Brian Goff
72aeb63a47 Reutrn immediately when inspect connection failed
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2015-11-04 21:17:05 -05:00
Sally O'Malley
41de7a18d8 Change 'docker run' exit codes to distinguish docker/contained errors
The purpose of this PR is for users to distinguish Docker errors from
contained command errors.
This PR modifies 'docker run' exit codes to follow the chroot standard
for exit codes.
Exit status:
125 if 'docker run' itself fails
126 if contained command cannot be invoked
127 if contained command cannot be found
the exit status otherwise

Signed-off-by: Sally O'Malley <somalley@redhat.com>
2015-11-04 15:18:50 -05:00
Shuwei Hao
11062ea177 Fixing wrong word spelling in api/client/network.go
Signed-off-by: Shuwei Hao <haoshuwei24@gmail.com>
2015-11-04 13:42:34 +00:00
RyanDeng
e222c61594 fix the bug: cpu percent will extremely high
Signed-off-by: Chao Deng <sheldon.d1018@gmail.com>
2015-11-03 10:57:52 +08:00
Hu Keping
5a3236d9e8 Update logic of history
Signed-off-by: Hu Keping <hukeping@huawei.com>
2015-11-02 10:27:54 +08:00
Arnaud Porterie
5719d01066 Merge pull request #16579 from coolljt0725/fix_attach_paused_container
Add show error when attach to a paused container
2015-10-31 07:43:22 -07:00
John Howard
d5c85897f4 Windows: Allows --isolation on docker build
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-10-30 11:14:38 -07:00
Sebastiaan van Stijn
855487b379 Merge pull request #17365 from HuKeping/rework-history
Rework docker cli history
2015-10-30 10:33:16 +01:00
David Calavera
34668ad68b Let the api to choose the default network driver.
That way swarm can understand the user's intention.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-10-29 19:47:12 -04:00
Hu Keping
09eedc35b2 Rework docker cli history
The implementation of `history` is a little redundant espacially
when user set the `--human` and/or `--no-trunc` options.

There are too many conditionals for `human`, `no-trunc` and `quiet` which
I think is useless and complicated.

Since `quiet` will only display the container IDs so it could be not
nested with the other options.

Signed-off-by: Hu Keping <hukeping@huawei.com>
2015-10-29 17:59:07 +08:00
Lei Jitang
de1d611990 Add show error when attach to a paused container
Signed-off-by: Lei Jitang <leijitang@huawei.com>
2015-10-28 21:00:09 -04:00
Jess Frazelle
b227d19cae Merge pull request #17423 from cpuguy83/so_sensitive
Revert "dockerversion placeholder for library-import"
2015-10-27 18:32:18 -07:00
Brian Goff
b78ca243d9 Revert "dockerversion placeholder for library-import"
This reverts commit d5cd032a86.

Commit caused issues on systems with case-insensitive filesystems.
Revert for now

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2015-10-27 21:23:53 -04:00
Brian Goff
2266462f72 Merge pull request #17373 from Microsoft/10662-volumetests
Windows: Volume integration tests
2015-10-27 19:52:11 -04:00