Commit Graph

4770 Commits (master)

Author SHA1 Message Date
Vincent Demeester 168b0d7f98 Merge pull request #23283 from yongtang/23211-spf13-cobra-diff
Use spf13/cobra for docker diff
2016-06-06 09:05:18 +02:00
Vincent Demeester dd2c65392f Merge pull request #23268 from WeiZhang555/cobra-start
Migrate start command to cobra
2016-06-06 08:59:42 +02:00
Zhang Wei 217e98c710 Migrate start command to cobra
Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
2016-06-06 09:53:18 +08:00
Yong Tang 316ab12eed Use spf13/cobra for docker unpause
This fix is part of the effort to convert commands to spf13/cobra #23211.

Thif fix coverted command `docker unpause` to use spf13/cobra

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-06-05 17:29:52 -07:00
Yong Tang a5c6af94b1 Use spf13/cobra for docker logs
This fix is part of the effort to convert commands to spf13/cobra #23211.

Thif fix coverted command `docker logs` to use spf13/cobra

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-06-05 15:51:35 -07:00
Yong Tang 65fed1bca2 Use spf13/cobra for docker diff
This fix is part of the effort to convert commands to spf13/cobra #23211.

Thif fix coverted command `docker diff` to use spf13/cobra

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-06-05 15:13:55 -07:00
Vincent Demeester 894cc1f201 Use spf13/cobra for docker rmi
Moves image command rmi to `api/client/image/remove.go` and use cobra :)

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-06-05 22:40:35 +02:00
Vincent Demeester 713f88ec6f Merge pull request #23276 from yongtang/23211-spf13-cobra-stop
Use spf13/cobra for docker stop
2016-06-05 22:37:15 +02:00
Yong Tang 4770a4ba82 Use spf13/cobra for docker stop
This fix is part of the effort to convert commands to spf13/cobra #23211.

Thif fix coverted command `docker stop` to use spf13/cobra

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-06-05 10:25:21 -07:00
Vincent Demeester 6ee903eea0 Migrate export command to cobra
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-06-05 16:42:19 +02:00
Sebastiaan van Stijn 8ad0a0ff95 Merge pull request #23253 from vdemeester/carry-pr-23159
Carry #23159 : Use spf13/cobra for `docker run` and `docker create`
2016-06-04 18:55:23 +02:00
Vincent Demeester 4a7a5f3a57 Display "See 'docker cmd --help'." in error cases
This brings back this message in case missing arguments.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-06-04 16:19:54 +02:00
Daniel Nephin aee3578520 Convert 'docker create' to use cobra and pflag
Return the correct status code on flag parsins errors.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-06-04 13:57:30 +02:00
Daniel Nephin 69d3037635 Convert 'docker create' to use cobra and pflag
Return the correct status code on flag parsins errors.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-06-04 13:57:30 +02:00
Daniel Nephin 396c0660ab Convert 'docker run' to a cobra command and to use pflags
Move container options into a struct so that tests should pass.
Remove unused FlagSet arg from Parse
Disable interspersed args on docker run

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-06-04 13:55:35 +02:00
Vincent Demeester bbefa88a8c Use spf13/cobra for docker search
- Move image command search to `api/client/image/search.go`
- Use cobra :)

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-06-03 19:50:01 +02:00
Daniel Nephin 82c85e1e83 Make the -h flag deprecated.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-05-31 15:43:16 -07:00
Daniel Nephin 25892d27be Use Args in cobra.Command to validate args.
Also re-use context.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-05-31 15:43:16 -07:00
Daniel Nephin 11ede59379 Support usage messages on bad flags.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-05-31 15:43:16 -07:00
Daniel Nephin ad83c422f2 Migrate volume commands to cobra.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-05-31 14:41:37 -07:00
Daniel Nephin 13cea4e58d Update usage and help to (almost) match the existing docker behaviour
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-05-31 14:41:37 -07:00
Daniel Nephin 4786ccd05c Migrate volume commands to cobra.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-05-31 14:41:37 -07:00
John Starks 9b1a322d9e Windows: work around Go 1.6.2/Nano Server TP5 issue
This works around golang/go#15286 by explicitly loading shell32.dll at
load time, ensuring that syscall can load it dynamically during process
startup.

Signed-off-by: John Starks <jostarks@microsoft.com>
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2016-05-25 11:59:28 +02:00
muge 79b8543b54 cli: remove unnecessary initErr type
Signed-off-by: ZhangHang <stevezhang2014@gmail.com>
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2016-05-23 13:04:10 -07:00
Daniel Nephin 765ab2b692 Raise a more relevant error when dockerd is not available on the platform.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-05-02 11:59:25 -04:00
Daniel Nephin 625263e2c7 When exec'ing dockerd, look for it in the same directory as the docker binary first, before checking path.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-05-02 11:52:50 -04:00
David Calavera 3d58ff580f Merge pull request #22372 from dnephin/cli_cleanup
Reorganize client and cli packages
2016-04-29 17:31:39 -07:00
David Calavera 5de3b105a8 Merge pull request #22372 from dnephin/cli_cleanup
Reorganize client and cli packages
2016-04-29 17:31:39 -07:00
John Howard 320dbb2c30 Merge pull request #22340 from Microsoft/jstarks/split-service
Windows: Support running dockerd as a service
2016-04-29 10:47:20 -07:00
Brian Goff 89d78abcdc Remove reflection on CLI init
before:
```
$ time docker --help
real  0m0.177s
user  0m0.000s
sys 0m0.040s
```

after:
```
$ time docker --help
real  0m0.010s
user  0m0.000s
sys 0m0.000s
```

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2016-04-29 11:57:46 -04:00
Brian Goff eb35552fb3 Remove reflection on CLI init
before:
```
$ time docker --help
real  0m0.177s
user  0m0.000s
sys 0m0.040s
```

after:
```
$ time docker --help
real  0m0.010s
user  0m0.000s
sys 0m0.000s
```

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2016-04-29 11:57:46 -04:00
Daniel Nephin 2bc929b019 Consolidate the files in client/
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-04-27 14:53:36 -04:00
Daniel Nephin ec6cc96fa1 Consolidate the files in client/
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-04-27 14:53:36 -04:00
Daniel Nephin a5c08fdbf0 Cleanup the structure of the cli package.
Move all flags into cli/flags
Move usage help into cli/usage.go

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-04-27 14:25:47 -04:00
Daniel Nephin 315e242b9c Cleanup the structure of the cli package.
Move all flags into cli/flags
Move usage help into cli/usage.go

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-04-27 14:25:47 -04:00
John Starks 421e366d8d Windows: Support running dockerd as a service
This adds support for Windows dockerd to run as a Windows service, managed
by the service control manager. The log is written to the Windows event
log (and can be viewed in the event viewer or in PowerShell). If there is
a Go panic, the stack is written to a file panic.log in the Docker root.

Signed-off-by: John Starks <jostarks@microsoft.com>
2016-04-26 14:04:47 -07:00
John Howard 969302c169 Make dockerd debuggable
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-04-26 09:35:22 -07:00
John Howard c6919a6e79 Make dockerd debuggable
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-04-26 09:35:22 -07:00
John Starks 5c252a7914 Windows: Add file version information
This change adds file version information to docker.exe and dockerd.exe by
adding a Windows version resource with the windres tool.

This change adds a dependency to binutils-mingw-w64 on Linux, but removes
a dependency on rsrc. Most Windows build environments should already have
windres if they have gcc (which is necessary to build dockerd).

Signed-off-by: John Starks <jostarks@microsoft.com>
2016-04-24 10:55:51 -07:00
Daniel Nephin ef9ad85429 Cleanup from CR.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-04-23 15:05:15 -04:00
Daniel Nephin 0c4f21fee3 Build two binaries client and daemon.
Add a proxy to support 'docker daemon'
Fix configFile option, and remove a test that is no longer relevant.
Remove daemon build tag.
Remove DOCKER_CLIENTONLY from build scripts.

Signed-off-by: Daniel Nephin <dnephin@docker.com>

Change docker-daemon to dockerd.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-04-22 11:26:01 -04:00
Daniel Nephin 91dd0c0c69 Build two binaries client and daemon.
Add a proxy to support 'docker daemon'
Fix configFile option, and remove a test that is no longer relevant.
Remove daemon build tag.
Remove DOCKER_CLIENTONLY from build scripts.

Signed-off-by: Daniel Nephin <dnephin@docker.com>

Change docker-daemon to dockerd.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-04-22 11:26:01 -04:00
allencloud 57171ee83c fix typos
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-03-26 22:06:45 +08:00
Martin Mosegaard Amdisen bcd0ac71ae Update 'save' command help
Based on review feedback.

Signed-off-by: Martin Mosegaard Amdisen <martin.amdisen@praqma.com>
2016-03-22 08:16:52 +01:00
Martin Mosegaard Amdisen 54e7de9b12 Fix plural typo in 'save' command help
The form "Save an images" is not correct.
Either "Save an image" or "Save images" work, but since
the save commands accepts multiple images, I chose the
latter.

Fixed in all places where I could grep "Save an image(s)".

Signed-off-by: Martin Mosegaard Amdisen <martin.amdisen@praqma.com>
2016-03-21 15:15:40 +01:00
Sebastiaan van Stijn 38f2513340 Remove some references to "register" through login
These were left-overs from the now deprecated
and removed functionality to registrer a new account
through "docker login"

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2016-03-01 17:33:23 +01:00
Zhang Wei 7a30e41b84 Update RestartPolicy of container
Add `--restart` flag for `update` command, so we can change restart
policy for a container no matter it's running or stopped.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
2016-02-20 17:06:32 +08:00
huqun c73cd919b4 fix grammar error
it is not very important,but I think the modification makes the coders read more conviently!

Signed-off-by: huqun  <huqun@zju.edu.cn>
2016-02-12 16:11:31 +08:00
David Calavera 9683297348 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
Qiang Huang c9a59eb644 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