Commit graph

101 commits

Author SHA1 Message Date
Daniel Nephin
234a8b9496 exit with status 1 if help is called on an invalid command.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
(cherry picked from commit bb7601a3ff)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-28 11:18:28 -08:00
Darren Stahl
00fd466e00 Swap usage of LazyDLL and LoadDLL to LazySystemDLL.
Signed-off-by: Darren Stahl <darst@microsoft.com>
(cherry picked from commit 22c83c567f)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-22 18:40:35 -08:00
Victor Vieux
4edaaeb671 fix a few golint errors
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
(cherry picked from commit 9c559e6d0b)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-19 23:50:06 -08:00
Victor Vieux
e773e0e654 error on cli when trying to use experimental feature with non experimental daemon
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
(cherry picked from commit 98bb08fe38)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-19 23:48:19 -08:00
Andrea Luzzardi
0d94260458 router: Return explicit error rather than 404 for experimental.
Instead of not adding experimental routes at all, fail with an explicit
message if the daemon is not running in experimental mode.

Added the `router.Experimental` which does this automatically.

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
(cherry picked from commit 3976a33c1a)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-19 23:47:12 -08:00
Victor Vieux
411e0bdc8e refactor help func in CLI
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
(cherry picked from commit bf95472105)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-18 13:30:44 -08:00
Tonis Tiigi
0269ac0494 Skip cli initialization for daemon command
Cli initialization pings back to remote API and
creates a deadlock if socket is already being
listened by systemd.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2016-11-16 17:10:48 -08:00
John Stephens
16d4e6395e Show experimental flags and subcommands if enabled
Signed-off-by: John Stephens <johnstep@docker.com>
2016-11-14 11:34:17 -08:00
Victor Vieux
2712bb26e3 Merge pull request #28274 from Microsoft/jjh/acl
Windows: create daemon root with ACL
2016-11-11 09:20:32 -08:00
Wang Long
2b7f7e9aff Use '.' directly
Signed-off-by: Wang Long <long.wanglong@huawei.com>
2016-11-11 10:22:32 +08:00
John Howard
46ec4c1ae2 Windows: create daemon root with ACL
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-11-10 17:51:28 -08:00
Victor Vieux
c410222e42 move plugins out of experimental
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-11-10 15:51:32 -08:00
Andrea Luzzardi
819d0159bb api: Service Logs support
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2016-11-10 13:46:02 -08:00
Victor Vieux
e98e4a7111 always add but hide experimental cmds and flags
Signed-off-by: Victor Vieux <vieux@docker.com>

update cobra and use Tags

Signed-off-by: Victor Vieux <vieux@docker.com>

allow client to talk to an older server

Signed-off-by: Victor Vieux <vieux@docker.com>
2016-11-08 04:55:27 -08:00
Tibor Vass
109c26bd74 Merge pull request #28056 from LK4D4/solaris_me
Add functional support for Docker sub commands on Solaris
2016-11-07 16:46:18 -08:00
Amit Krishnan
934328d8ea Add functional support for Docker sub commands on Solaris
Signed-off-by: Amit Krishnan <krish.amit@gmail.com>

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2016-11-07 09:06:34 -08:00
yupeng
c09277d5c3 Align arg with other cli
Signed-off-by: yupeng <yu.peng36@zte.com.cn>
2016-11-05 13:47:02 +08:00
Victor Vieux
d34ca0178e update cobra and use Tags
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-11-04 12:04:14 -07:00
Victor Vieux
3e43fa28ec always add but hide experimental cmds and flags
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-11-03 17:31:12 -07:00
Anusha Ragunathan
4a955dc4d4 Merge pull request #27914 from riyazdf/check-plugins-on-startup
Check authz plugins on daemon startup, add v2 integration tests
2016-11-02 13:38:32 -07:00
Riyaz Faizullabhoy
2b045027ce Check authz plugins are valid on daemon startup, add integration tests
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2016-11-02 11:20:54 -07:00
yupeng
06f1602374 Align with other cli descriptions
Signed-off-by: yupeng <yu.peng36@zte.com.cn>
2016-11-01 13:41:49 +08:00
Brian Goff
f81c538fec Merge pull request #27700 from Microsoft/jjh/servicerestart
Windows: Set service recovery options
2016-10-28 12:06:24 -07:00
Michael Crosby
3343d234f3 Add basic prometheus support
This adds a metrics packages that creates additional metrics.  Add the
metrics endpoint to the docker api server under `/metrics`.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>

Add metrics to daemon package

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>

api: use standard way for metrics route

Also add "type" query parameter

Signed-off-by: Alexander Morozov <lk4d4@docker.com>

Convert timers to ms

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-10-27 10:34:38 -07:00
Akihiro Suda
7e24c16086 add docker network prune
`docker network prune` prunes unused networks, including overlay ones.
`docker system prune` also prunes unused networks.

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2016-10-25 06:43:54 +00:00
Sebastiaan van Stijn
411e7b4416 Merge pull request #24533 from yongtang/24392-docker-info-label-duplicate-keys
Remove duplicate keys in labels of `docker info`
2016-10-24 18:12:28 -07:00
John Howard
eea679fbcc Windows: Set service recovery options
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-10-24 16:24:27 -07:00
Kenfe-Mickael Laventure
7781a1bf0f Make experimental a runtime flag
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-10-24 15:20:01 -07:00
Vincent Demeester
ce6cfef36d Merge pull request #27460 from Microsoft/jjh/dockerpid
Windows: Calculate PID file after root
2016-10-22 13:41:42 +02:00
Yong Tang
e4c9079d09 Remove duplicate keys in labels of docker info
This fix tries to address the issue raised in 24392 where
labels with duplicate keys exist in `docker info`, which
contradicts with the specifications in the docs.

The reason for duplicate keys is that labels are stored as
slice of strings in the format of `A=B` (and the input/output).

This fix tries to address this issue by checking conflict
labels when daemon started, and remove duplicate labels (K-V).

The existing `/info` API has not been changed.

An additional integration test has been added to cover the
changes in this fix.

This fix fixes 24392.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-10-18 07:45:27 -07:00
Vincent Demeester
15ea28f6db Merge pull request #27463 from Microsoft/jjh/runservice
Windows: Mark run-service flag as hidden
2016-10-18 15:51:10 +02:00
Yong Tang
cc703784f3 Update docker stop and docker restart to allow not specifying timeout and use the one specified at container creation time.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-10-17 12:53:35 -07:00
John Howard
102a38ceb1 Windows: Mark run-service flag as hidden
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-10-17 12:21:31 -07:00
John Howard
7453d028da Windows: Calculate PID file after root
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-10-17 11:48:51 -07:00
Tõnis Tiigi
62503f245f Merge pull request #27276 from yuexiao-wang/func-name
Modify function name from SetDaemonLogLevel to SetLogLevel
2016-10-13 12:10:59 -07:00
Anusha Ragunathan
c5393ee147 Make authorization plugins use pluginv2.
Signed-off-by: Anusha Ragunathan <anusha@docker.com>
2016-10-11 13:09:28 -07:00
yuexiao-wang
fe3ff54c7a Modify function name from SetDaemonLogLevel to SetLogLevel
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
2016-10-11 19:35:12 +08:00
Sebastiaan van Stijn
bf58dd82c3
Deprecate "daemon" subcommand
The daemon is in a separate (dockerd) binary
since docker 1.12, so should no longer be
used.

This marks the command as deprecated, and
adds it to the deprecated features list.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2016-09-23 00:26:27 +02:00
Stefan Scherer
40868e263d
Write fatal error to event log if running as service
Signed-off-by: Stefan Scherer <scherer_stefan@icloud.com>
2016-09-19 22:36:33 +02:00
Jana Radhakrishnan
c9fb551d60 Fix autostart for swarm scope connected containers
The swarm scope network connected containers with autostart enabled
there was a dependency problem with the cluster to be initialized before
we can autostart them. With the current container restart code happening
before cluster init, these containers were not getting autostarted
properly. Added a fix to delay the container start of those containers
which has atleast one swarm scope endpoint to until after the cluster is
initialized.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2016-09-13 14:21:58 -07:00
boucher
0dfbf960d7 Fix the clashing route syntax for checkpoint/container delete.
Signed-off-by: boucher <rboucher@gmail.com>
2016-09-08 21:31:56 -04:00
boucher
d8fef66b03 Initial implementation of containerd Checkpoint API.
Signed-off-by: boucher <rboucher@gmail.com>
2016-09-08 21:31:52 -04:00
Daniel Nephin
0640a14b4f Move api/client -> cli/command
Using
  gomvpkg
     -from github.com/docker/docker/api/client
     -to github.com/docker/docker/cli/command
     -vcs_mv_cmd 'git mv {{.Src}} {{.Dst}}'

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-09-08 15:46:29 -04:00
yuexiao-wang
00dcbd0693 Fix readme doc for dockerd
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
2016-09-01 14:47:51 +08:00
Brian Goff
edafc642b2 Merge pull request #25890 from cpuguy83/fix_swarm_control_sock_path
Use daemon exec root for swarm control socket
2016-08-30 08:51:52 -04:00
Daniel Nephin
a594cd8991 Fix daemon command proxy.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-08-26 12:19:02 -04:00
Daniel Nephin
6e7405ebd4 Fix tests and windows service.
Support args to RunCommand
Fix docker help text test.
Fix for ipv6 tests.
Fix TLSverify option.
Fix TestDaemonDiscoveryBackendConfigReload
Use tempfile for another test.
Restore missing flag.
Fix tests for removal of shlex.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-08-25 13:09:36 -04:00
Daniel Nephin
14712f9ff0 Remove old cli framework.
Also consolidate the leftover packages under cli.
Remove pkg/mflag.
Make manpage generation work with new cobra layout.
Remove remaining mflag and fix tests after rebase with master.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-08-25 13:09:04 -04:00
Daniel Nephin
31bf9ca0c8 Update unit tests for new cobra root command.
Cleanup cobra integration
Update windows files for cobra and pflags
Cleanup SetupRootcmd, and remove unnecessary SetFlagErrorFunc.
Use cobra command traversal

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-08-25 13:09:04 -04:00
Daniel Nephin
0452ff5a4d Convert docker root command to use pflag and cobra
Fix the daemon proxy for cobra commands.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-08-25 13:09:03 -04:00