Commit graph

1555 commits

Author SHA1 Message Date
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
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
Doug Davis
b3e1178ad0 Fix error messages
`docker kill 123` will show something like:
`Error response from daemon: Cannot kill container 123: nosuchcontainer: No such container: 123`
Notice the `nosuchcontainer` text, that should not be there as that's an internal ID that means nothing to the end user.
This PR fixes this by using `util.GetErrorMessage()` to extract just the message.

While in that dir I found a couple of other spots that could use the same call, just to be safe.

Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-12-29 06:08:52 -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
Arnaud Porterie
baee7ae045 Merge pull request #18715 from calavera/remove_is_paused_from_interface
Remove `IsPaused` from backend interface.
2015-12-28 11:25:11 -08:00
David Calavera
8669ea01ba Merge pull request #15078 from hqhq/hq_add_set_api_v2
Implement docker update command
2015-12-28 08:55:32 -08: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
Qiang Huang
2e02077e9f Remove duplicated OomKilldisable
It's in Resources, but wrongly added back to HostConfig in
https://github.com/docker/docker/pull/18762

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2015-12-24 15:28:56 +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
83237aab2b Remove package pkg/ulimit, use go-units instead.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2015-12-23 13:27:58 -05: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
David Calavera
0aab83d996 Move blkiodev package to types.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-22 13:31:46 -05:00
David Calavera
f9b857a200 Move StrSlice to types.
This is a very docker concept that nobody elses need.
We only maintain it to keep the API backwards compatible.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-22 13:31:43 -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
David Calavera
af94f941df Remove IsPaused from backend interface.
Move connection hijacking logic to the daemon.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-21 12:34:21 -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
Antonio Murdaca
92605b823d Merge pull request #18761 from anusha-ragunathan/add-build-routes
Create build router separate from image router.
2015-12-18 21:09:43 +01:00
Vincent Demeester
b714e03fdd Merge pull request #18771 from runcom/authz-fixes-1
authZ: more fixes
2015-12-18 17:58:02 +01:00
Vincent Demeester
64d70de0a2 Merge pull request #18721 from tiborvass/remove-dependencies-from-builder
Remove image and daemon dependencies from builder
2015-12-18 17:19:55 +01:00
Brian Goff
b708a2249b Merge pull request #18730 from calavera/remove_sockets_dependency
Remove api client lib dependency on tlsconfig and sockets packages.
2015-12-18 10:35:51 -05:00
Antonio Murdaca
5a64c8027e authZ: more fixes
- fix naming and formatting
- provide more context when erroring auth
- do not capitalize errors
- fix wrong documentation
- remove ugly remoteError{}

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2015-12-18 16:29:01 +01:00
Antonio Murdaca
47060efdb7 Merge pull request #18741 from WeiZhang555/debug-info
Better debug message for post form data
2015-12-18 16:06:07 +01: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
Anusha Ragunathan
f8dc044aec Create build router separate from image router.
Signed-off-by: Anusha Ragunathan <anusha@docker.com>
2015-12-17 16:56:11 -08: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