Commit graph

245 commits

Author SHA1 Message Date
qq690388648
1cb9b0745c replace the os.Stdout with stdout to adapt platform
Signed-off-by: Sun Gengze <690388648@qq.com>
2015-12-30 18:24:02 +08:00
Antonio Murdaca
7929888214 Remove deprecated cli flags
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2015-11-15 10:40:01 +01: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
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
Vincent Demeester
d5cd032a86 dockerversion placeholder for library-import
- Move autogen/dockerversion to version
- Update autogen and "builds" to use this package and a build flag

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2015-10-27 20:36:07 +01:00
Lei Jitang
2b0927c9ac Use consistent command description
Signed-off-by: Lei Jitang <leijitang@huawei.com>
2015-10-08 08:46:21 -04:00
Lei Jitang
4d55877e27 Clean up: show usage when global --help present
Signed-off-by: Lei Jitang <leijitang@huawei.com>
2015-09-23 05:17:03 -04:00
Harald Albers
ceb11d9660 Remove -h flag from completion and daemon reference
All docker subcommands support `-h` as an alias for `--help`
unless they have `-h` aliased to something else like `docker run`,
which uses `-h` for `--hostname`.

`-h` is not included in the help messages of the commands, though.

It ist visible in
* reference: only in `docker daemon` reference,
  see output of `grep -Rse --help=false docs`
* man pages: only in `docker` man page
  see output of `grep -RF '**-h**' man`

For consistency reasons, this commit removes `-h` as an alias for
`--help` from the reference page, man page and the bash completion.

Signed-off-by: Harald Albers <github@albersweb.de>
2015-08-11 07:30:58 -07:00
Ankush Agarwal
4d212f7853 Add test to check if subcommands are sorted
Signed-off-by: Ankush Agarwal <ankushagarwal11@gmail.com>
2015-08-07 01:34:21 -07:00
Tibor Vass
96ce3a194a cli: new daemon command and new cli package
This patch creates a new cli package that allows to combine both client
and daemon commands (there is only one daemon command: docker daemon).

The `-d` and `--daemon` top-level flags are deprecated and a special
message is added to prompt the user to use `docker daemon`.

Providing top-level daemon-specific flags for client commands result
in an error message prompting the user to use `docker daemon`.

This patch does not break any old but correct usages.

This also makes `-d` and `--daemon` flags, as well as the `daemon`
command illegal in client-only binaries.

Signed-off-by: Tibor Vass <tibor@docker.com>
2015-07-23 19:44:46 -04:00
Sevki Hasirci
ce3156f1eb fix mixed typo TlS -> TLS
Signed-off-by: Sevki Hasirci <s@sevki.org>
2015-07-20 21:14:45 +03:00
Sevki Hasirci
16ea3cf3a3 golint fix TLs->TLS in docker/
Signed-off-by: Sevki Hasirci <s@sevki.org>
2015-07-20 20:50:03 +03:00
Doug Davis
daced1d303 Add support for DOCKER_CONFIG/--config to specific config file dir
Carry #11675

Aside from what #11675 says, to me a key usecase for this is to support
more than one Docker cli running at the same time but each may have its
own set of config files.

Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-07-10 12:51:34 -07:00
Brian Goff
5a6a33f7ac Fix DOCKER_TLS_VERIFY being ignored
DOCEKR_TLS_VERIFY was being ignored because we were just checking if the
`-tlsverify` flag was set, not the actual value, which is defaulted to
the value of `os.Getenv("DOCKER_TLS_VERIFY") != ""`

The problem that this specifically fixes is where the client has set the
`DOCKER_TLS_VERIFY` env var but is connecting to a daemon that is not
verifed.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2015-06-16 12:04:00 -04:00
Tibor Vass
bfed4b7cc3 Refactor TLS code with a new tlsconfig package
This patch creates a new `tlsconfig` package to handle creation of
secure-enough TLS configurations for clients and servers.

The package was created by refactoring TLS code in the client and the
daemon. After this patch, it is expected that all code creating TLS
configurations use this `tlsconfig` package for greater security,
consistency and readability.

On the server side, this fixes a bug where --tlsverify was not taken
into account. Now, if specified, it will require the client to
authenticate.

Signed-off-by: Tibor Vass <tibor@docker.com>
2015-06-05 12:38:38 -04:00
Jessica Frazelle
b372f9f224 fix experimental version and release script
add api version experimental

Signed-off-by: Jessica Frazelle <princess@docker.com>
2015-05-29 10:00:22 -07:00
Arnaud Porterie
78578125ce Add suffix to experimental builds version
Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
2015-05-21 16:27:42 -07:00
Arnaud Porterie
ca6722f1c5 Add DOCKER_EXPERIMENTAL environment variable
The DOCKER_EXPERIMENTAL environment variable drives the activation of
the 'experimental' build tag.

Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
2015-05-20 12:21:17 -07:00
Doug Davis
a85ca8b7c4 add link between -D and --log-level=debug back in
Due to popular demand :-)
See #11965

Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-05-14 10:29:49 -07:00
Antonio Murdaca
56847ec4d4 Merge pull request #13106 from duglin/HumanizeCliErrors
Use stderr instead of logrus for CLI error messages
2015-05-13 05:23:56 +02:00
Jessie Frazelle
36d995a291 Merge pull request #11965 from duglin/DEBUG
Remove use of "DEBUG" env var from CLI and de-couple -D from --log-level
2015-05-12 18:24:04 -07:00
Doug Davis
0024935f64 Use stderr instead of logrus for CLI error messages
Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-05-12 17:22:41 -07:00
jhowardmsft
cbf9a64cb5 Windows: Change default listener to HTTP
Signed-off-by: jhowardmsft <jhoward@microsoft.com>
2015-04-30 19:49:45 -07:00
Doug Davis
534ed8c2d4 Remove use of "DEBUG" env var from CLI and decouple DEBUG from --log-level
Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-04-29 06:20:33 -07:00
Antonio Murdaca
4b9fe9c298 Remove job from container_inspect
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
2015-04-23 00:58:13 +02:00
Deshi Xiao
bae3023eef client.StatusError don't be returned as a pointer
closes #12373

1. remove & from client.StatusError
2. remove * from Error method

Signed-off-by: Deshi Xiao <xiaods@gmail.com>
2015-04-16 01:27:07 +08:00
Antonio Murdaca
c30a55f14d Refactor utils/utils, fixes #11923
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
2015-04-14 01:37:36 +02:00
Antonio Murdaca
6f4d847046 Replace aliased imports of logrus, fixes #11762
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
2015-03-26 23:22:04 +01:00
Tibor Vass
01a43174da winconsole: cleanup
Signed-off-by: Tibor Vass <tibor@docker.com>
2015-03-22 15:47:54 -04:00
Sachin Joshi
816d602059 Reduce memory allocation and remove channels
Signed-off-by: Sachin Joshi <sachin_jayant_joshi@hotmail.com>
2015-03-19 18:07:56 -07:00
Sachin Joshi
898d2763c5 Move windows console specific implementation in sub package
Signed-off-by: Sachin Joshi <sachin_jayant_joshi@hotmail.com>
2015-03-16 14:04:53 -07:00
Sachin Joshi
d8c3090dd9 ANSI terminal emulation for windows
It is implemented by intercepting and interpreting the output
escape sequence by calling win32 console apis.

In addition the input from win32 console is translated to linux keycodes

Signed-off-by: Sachin Joshi <sachin_jayant_joshi@hotmail.com>
2015-03-16 14:04:49 -07:00
Shishir Mahajan
0ab28c6589 Fix: docker -d -h start daemon instead of showing help menu
Signed-off-by: Shishir Mahajan <shishir.mahajan@redhat.com>
2015-03-02 17:01:56 -05:00
Zen Lin(Zhinan Lin)
08ea03ccb9 To avoid the confusing in log, change '%s' to '%q', change the question sentence to a reminding sentence.
Signed-off-by: Zen Lin(Zhinan Lin) <linzhinan@huawei.com>
2015-03-02 19:14:22 +08:00
Srini Brahmaroutu
6871b9b16a Removing -X flag option and autogenerated code to create Dockerversion.go functionality
Addresses #9207

Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
2015-02-20 05:40:12 +00:00
Derek McGowan
0eed1f4d8d Defer creation of trust key file until needed
Fixes #10442

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2015-01-29 13:46:12 -08:00
Derek McGowan
06af013f8b Fix daemon key file location
Fixes #10233

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2015-01-21 16:28:19 -08:00
Derek McGowan
25945a40c4 Refactor from feedback
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2015-01-15 14:05:06 -08:00
Derek McGowan
ac8d964b28 Add trust key creation on client
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2015-01-15 14:04:14 -08:00
Doug Davis
ae9bd580af Make --tlsverify enable tls regardless of value specified
I also needed to add a mflag.IsSet() function that allows you to check
to see if a certain flag was actually specified on the cmd line.

Per #9221 - also tweaked the docs to fix a typo.

Closes #9221

Signed-off-by: Doug Davis <dug@us.ibm.com>
2014-11-20 16:09:06 -08:00
Doug Davis
2facc04673 Add --log-level support
Next steps, in another PR, would be:
- make all logging go through the logrus stuff
- I'd like to see if we can remove the env var stuff (like DEBUG) but we'll see

Closes #5198

Signed-off-by: Doug Davis <dug@us.ibm.com>
2014-11-15 09:00:48 -08:00
Alexandr Morozov
18d9f1978b Fix vet errors
Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
2014-11-05 08:26:22 -08:00
unclejack
acd64278f1 pkg/reexec: move reexec code to a new package
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
2014-10-30 14:48:30 +02:00
Alexandr Morozov
7c62cee51e Use logrus everywhere for logging
Fixed #8761

Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
2014-10-24 15:03:06 -07:00
Jessica Frazelle
a7aedca4a1 Client should use go log package.
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
2014-10-24 13:03:46 -07:00
Tibor Vass
10f78974ca Merge pull request #8588 from dqminh/remove-sslv3
remove sslv3 from server's TLS supported versions
2014-10-17 12:05:48 -04:00
Alexandr Morozov
cb106e74a1 Merge pull request #8238 from vbatts/vbatts-daemon_timestamps
daemon logging: unifying output and timestamps
2014-10-16 15:55:49 -07:00
Daniel, Dao Quang Minh
7a062b2b8f Avoid fallback to SSL protocols < TLS1.0
Signed-off-by: Tibor Vass <teabee89@gmail.com>

Docker-DCO-1.1-Signed-off-by: Daniel, Dao Quang Minh <dqminh89@gmail.com> (github: dqminh)
2014-10-15 22:39:51 -04:00
Michael Crosby
712e8da885 Remove client key.json generation for trust
This removes the key generation for trust from main while it is not
being consumed.  The problem is that because this is being set in main
if a user runs as root initially the files will be owned by root.  Later
if the user sets up the docker group they are unable to read the keys.
This is half a user error and documentation problem and the other half
is management.

We decided to remove this code for now while it is not being used and
will revisit it later when the consuming features are added.  A few
options are to generate lazily and provide a clear error message on an
EPERM so that the user knows what is wrong and can correct the
permissions.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2014-10-14 17:16:45 +00:00
Derek McGowan
ea6a480128 Add libtrust key identity management
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2014-09-26 15:52:08 -07:00