Commit Graph

29 Commits

Author SHA1 Message Date
Yong Tang a79a27412d Fix issue in `docker import -c` with quoted flags
This fix tries to address the issue in 26173 where `docker import -c`
with quoted flags returns an error.

The issue was that in `api/client/image/import.go` the flag
`--change/-c` was handled by `StringSliceVarP` which does not handle
the quote well.

The similiar issue was enountered for 23309 (`docker commit`).

This fix takes the same approach as 23309 where `StringSliceVarP`
was replaced with `VarP` and `opts.ListOpts`.

An integration test has been added to cover the changes.

This fix fixes 26173.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-09-01 16:28:22 -07:00
John Howard c8ce0856b7 Fix golint errors in api
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-08-29 13:36:16 -07:00
shawnhe b642282990 correct command annotation
Signed-off-by: shawnhe <shawnhe@shawnhedeMacBook-Pro.local>
2016-08-25 21:29:59 +08:00
Anusha Ragunathan 9b6dcc8b9d Make `docker pull` detect plugin content and error out.
Signed-off-by: Anusha Ragunathan <anusha@docker.com>
2016-08-20 12:54:35 -07:00
Yong Tang b4ba575a28 Suppress verbose "Sending build context" messages in non tty scenarios
This fix tries to address the issue raised in 25661 where verbose
"Sending build context" messages were not suppressed in non tty (e.g. log file)
sencarios.

This fix suppress the "Sending build context" message (other than the last one)
if the output is not a tty. The last update of the "Sending build context"
message is still sent to the output.

This fix has been tested manually:
```
docker build -t tmp . > build.log
```
The output is (only one "Sending build context"):
```
Sending build context to Docker daemon 249.4 MB
Step 1 : FROM busybox
 ---> 2b8fd9751c4c
Step 2 : RUN echo 'test'
 ---> Using cache
 ---> 7db298b6c493
Successfully built 7db298b6c493
```

This fix fixes 25661.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-08-15 18:35:05 -07:00
Sebastiaan van Stijn 51dc35cf23
Implement stringutils.Ellipsis()
This patch implements an Ellipsis utility to
append an ellipsis (...)  when truncating
strings in output.

It also fixes the existing Truncate() utility
to be compatible with unicode/multibyte characters.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2016-08-11 14:14:06 +02:00
allencloud 0ead624473 add defer file.Close to avoid potential fd leak
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-08-10 08:36:09 +08:00
Vincent Demeester 7c8780ea63
Refactor dockerCli *Format to ConfigFile call
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-08-04 15:00:00 +02:00
Sebastiaan van Stijn db435560b3 Merge pull request #24389 from Microsoft/jjh/silentsecurity
Windows: No security warning on quiet
2016-07-08 11:06:33 -07:00
John Howard a9b3c1d720 Windows: No security warning on quiet
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-07-07 16:00:08 -07:00
Vincent Demeester f4cfc6b983
Updates on cli reference documentation
- Update ps with `--last` flag
- Update commands with current output
- Make sure hugo does not detect the wrong language
- Update usage for `tag` command to be more coherent with the other ones

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-07-07 20:43:18 +02:00
Zhang Wei 0e53976336 Make --help information consistent
Other docker command always print "[OPTIONS]" right after `docker
COMMAND`, but `build` and `push` has inconsistent help message.

This commit will fix help information format.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
2016-06-19 16:26:23 +08:00
Alexander Morozov f0193e278c Merge pull request #23256 from vdemeester/migrate-pull-push-to-cobra
Use spf13/cobra for docker push and docker pull
2016-06-13 14:16:42 -07:00
Vincent Demeester ad4e20cd92
Moving Image{Push,Pull}Privileged to trust.go
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-06-10 12:07:32 +02:00
Vincent Demeester 9640e3a451
Migrate push command to cobra
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-06-10 12:07:28 +02:00
Vincent Demeester fa67b984f8
Migrate pull command to cobra
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-06-10 12:07:23 +02:00
Vincent Demeester baf467722b
Migrate login & logout command to cobra
Also moves some common stuff around :
- `api/client/registry.go` for registry related
method (`ElectAuthServer`, …)
- `api/client/credentials.go` to interact with credentials

Migrate logout command to cobra

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-06-10 12:04:29 +02:00
Vincent Demeester 6632fd2788
Migrate save command to cobra
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-06-09 17:38:20 +02:00
Vincent Demeester 8b1d40271f
Migrate load command to cobra
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-06-09 17:28:33 +02:00
Alexander Morozov 3b08711bb7 Merge pull request #23343 from vdemeester/migrate-build-to-cobra
Use spf13/cobra for docker build
2016-06-08 11:59:48 -07:00
Sebastiaan van Stijn 08419313ec Merge pull request #23292 from yongtang/23211-spf13-cobra-images
Use spf13/cobra for docker images
2016-06-07 21:56:42 +02:00
Vincent Demeester 60f447b655
Migrate docker build to cobra
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-06-07 18:15:44 +02:00
Yong Tang ba7324ffcb Use spf13/cobra for docker tag
This fix is part of the effort to convert commands to spf13/cobra #23211.

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

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-06-07 08:12:49 -07:00
Yong Tang 65a0034c67 Use spf13/cobra for docker images
This fix is part of the effort to convert commands to spf13/cobra #23211.

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

NOTE: As part of this fix, a new function `RequiresMaxArgs()`
has been defined in `cli/required.go`. This func returns an
error if there is not at most max args

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-06-07 08:10:49 -07:00
Sebastiaan van Stijn f061f556f2 Merge pull request #23269 from vdemeester/migrate-import-to-cobra
Use spf13/cobra for docker import
2016-06-07 13:07:30 +02:00
Yong Tang a76d387cda Use spf13/cobra for docker history
This fix is part of the effort to convert commands to spf13/cobra #23211.

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

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-06-06 08:03:07 -07:00
Vincent Demeester 9d2e8abd30
Migrate import command to cobra
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-06-06 13:58:23 +02:00
Vincent Demeester 60e48bd6bd
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 a11ef10631
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