Commit Graph

310 Commits

Author SHA1 Message Date
23dd86bcae Unify docker commands' usage in man and help
Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
Upstream-commit: f38232b475d126d6ea3a37d82be2c7269324e4ab
Component: engine
2015-07-02 10:33:26 +08:00
35e8f92672 Remove dead code
Signed-off-by: Antonio Murdaca <runcom@linux.com>
Upstream-commit: 927d13bc3c2030bb0e0429dbc500f13d72e7ccf6
Component: engine
2015-06-20 19:14:15 +02:00
69ff11d75b 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>
Upstream-commit: 5a6a33f7acccc7394a5ac418e777d5a6e1d1b7ed
Component: engine
2015-06-16 12:04:00 -04:00
73b0733f08 docker/daemon: set umask to the default on startup
This sets up the umask so that it's the same on all systems.

Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com>
Upstream-commit: 6578ad90c307c5500a7998819743be88f63ef2b3
Component: engine
2015-06-15 16:47:20 +03:00
a180cd8538 Windows: Refactor daemon
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 8fb0ca2c35c0df38a79c4eac62fd7d04e3688240
Component: engine
2015-06-10 12:42:43 -07:00
67f2667620 Merge pull request #13022 from Microsoft/10662-addrsrc
Windows: Add resources for manifest and icon
Upstream-commit: a2ab067b3c56f6b296150531c94a05b357fc0d70
Component: engine
2015-06-08 15:16:10 -07:00
01de0478de 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>
Upstream-commit: bfed4b7cc3820ee3a74580aca55d5918bf05eef5
Component: engine
2015-06-05 12:38:38 -04:00
b199d8e0f8 Windows: Build docker.exe manifested and with icon
Signed-off-by: John Howard <John.Howard@microsoft.com>
Upstream-commit: fd935ee63db31e73b5ee5594644e04b959ead374
Component: engine
2015-06-04 11:49:10 -07:00
a4e456d439 fix experimental version and release script
add api version experimental

Signed-off-by: Jessica Frazelle <princess@docker.com>
Upstream-commit: b372f9f224d2dcc2a7beca55751782060dc9b12f
Component: engine
2015-05-29 10:00:22 -07:00
b53e996e55 Add suffix to experimental builds version
Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
Upstream-commit: 78578125ce6c534253d8d60c242d6993c569449e
Component: engine
2015-05-21 16:27:42 -07:00
045dd55a7d 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>
Upstream-commit: ca6722f1c5e4e2017a71e33579d91ac0d9ea2a25
Component: engine
2015-05-20 12:21:17 -07:00
2095b80959 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>
Upstream-commit: a85ca8b7c40f05f2b6471cc30fb8d5271605c1d1
Component: engine
2015-05-14 10:29:49 -07:00
af27a9480d Merge pull request #13106 from duglin/HumanizeCliErrors
Use stderr instead of logrus for CLI error messages
Upstream-commit: 56847ec4d4c24535bd8f4763e895f609eec9e8cf
Component: engine
2015-05-13 05:23:56 +02:00
d58b604612 Merge pull request #11965 from duglin/DEBUG
Remove use of "DEBUG" env var from CLI and de-couple -D from --log-level
Upstream-commit: 36d995a291c672205d1e8f93f19fb07de253c3d7
Component: engine
2015-05-12 18:24:04 -07:00
2e83148ffd Use stderr instead of logrus for CLI error messages
Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 0024935f641ab596732f9162d3eab795bbc2ae06
Component: engine
2015-05-12 17:22:41 -07:00
bda12eddfc Merge pull request #12422 from wlan0/logopts
add log opts flag to pass in logging options
Upstream-commit: fe3becee34a93ebffe4a9fbcb0057d2b82242307
Component: engine
2015-05-07 18:10:04 -07:00
3d5681c540 Merge pull request #13077 from duglin/MoveCommands
Make list of commands for help less static
Upstream-commit: 47fbe76a7ed5d4bd2a1c2016c1c962e482db797e
Component: engine
2015-05-07 17:35:54 -07:00
8c18f0e06f Make list of commands for help less static
Before this PR the list of commands that were printed for the help
text was statically put into the flags.Usage() function via main.init(). This
made it impossible to modify later on when we add new commands
via plugins.

This PR moves the list of commands (name & description) into a structure
that is sorted and printed dynamically by the Usage func.  This will allow
the code to add to the list of commands after the init() func is done
but before the help text is printed for the user.

This just moves code around - it should have no UX impact at all.

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 4f00b1020e8bf28d5d3dfb88730894888666fd9a
Component: engine
2015-05-07 16:22:06 -07:00
6da49015e7 Fix api servers creation and daemon start order
* daemon creation wasn't parallel to request buffering
* it was possible that empty volume will be created in
  /var/run/docker.sock by some container

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 08230703fdd0f7bcd9a87a0d61d88fdf2b901e66
Component: engine
2015-05-07 15:38:02 -07:00
0a78638a6e Add log opts flag to pass in logging options
Signed-off-by: wlan0 <sidharthamn@gmail.com>
Upstream-commit: dca9e02b15a3757272c90ec4cf0cc2b052a25fe3
Component: engine
2015-05-04 14:39:48 -07:00
c1ee29b6e9 Windows: Change default listener to HTTP
Signed-off-by: jhowardmsft <jhoward@microsoft.com>
Upstream-commit: cbf9a64cb5f69ce07598646ac26be247c7967cbb
Component: engine
2015-04-30 19:49:45 -07:00
016ac4bf61 Remove engine mechanism
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
Upstream-commit: 531f4122bdcd4de289f613a5ef010f4c1989f098
Component: engine
2015-04-30 01:35:16 +02:00
53d8f39607 Remove use of "DEBUG" env var from CLI and decouple DEBUG from --log-level
Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 534ed8c2d4573e88fcb68b23341504f8949b34b5
Component: engine
2015-04-29 06:20:33 -07:00
fdf9a8d629 Remove job from container_inspect
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
Upstream-commit: 4b9fe9c298c8778855c1d14e978c791496dd7c42
Component: engine
2015-04-23 00:58:13 +02:00
16569396d9 Remove engine.Job from builder.CmdBuildConfig.
Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: ae4063585e7936780154101f7fe416a080c6ff7c
Component: engine
2015-04-20 13:37:06 -07:00
2e27fa9e39 Make API server datastructure
Added daemon field to it, will use it later for acces to daemon from
handlers

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: d9ed3165228b60cb89c31d0d66b99e01ab83eb3e
Component: engine
2015-04-20 08:13:39 -07:00
932b7d41ce Make daemon initialization in main goroutine
It is simplifies code and lead to next refactoring step, where daemon
will be incorporated to some structure which represents API.

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 181fea24aac7499a3d6dc0c8c9de67e6c0036140
Component: engine
2015-04-20 08:13:39 -07:00
6488f10044 Remove builtins
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
Upstream-commit: a0bf80fe0372196812a9cb295f209c08f8037601
Component: engine
2015-04-17 14:27:38 +02:00
1931a4d310 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>
Upstream-commit: bae3023eef0ed8e0eb517ca53f6f97f1bf6786d3
Component: engine
2015-04-16 01:27:07 +08:00
a4111cba55 Refactor utils/utils, fixes #11923
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
Upstream-commit: c30a55f14dbbe3971ba0ac716ba69a60868f4490
Component: engine
2015-04-14 01:37:36 +02:00
ca7b99332a Merge pull request #11909 from runcom/11908-refactor-utils-utils-daemon
Refactor utils/utils_daemon
Upstream-commit: ebd7df3bbeb9486d13119178810a1ddabfd6d04d
Component: engine
2015-04-07 13:24:24 -07:00
cedce1294d Merge pull request #11554 from Sirupsen/logrus-fields
logging: use logrus fields
Upstream-commit: ac93a13e2745559887b5c5efd3cff1ed904f5092
Component: engine
2015-04-06 09:00:18 -07:00
5743caf126 daemon: convert version log statement to fields
Signed-off-by: Simon Eskildsen <sirup@sirupsen.com>
Upstream-commit: e1ca439828c33a186489da568a29d3f3a2951e03
Component: engine
2015-04-03 18:22:17 -04:00
31f1448b86 Refactor ultis/utils_daemon, fixes #11908
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
Upstream-commit: 01724c1cf11ce4a9e3b1978c7c07fd25656ed137
Component: engine
2015-04-03 20:20:04 +02:00
753b8ae08c Remove jobs from registry.Service
This makes `registry.Service` a first class type and does not use jobs
to interact with this type.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 03d3d79b2b3f8b720fff2d649aff0ef791cff417
Component: engine
2015-03-31 16:38:04 -07:00
358cb6ec63 Refactor API socket handling
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 62806cc85e7faee56acc454b67b8f36786472759
Component: engine
2015-03-31 13:37:49 -07:00
7fd0208ff7 Upgrade logrus to v0.7.2
- Daemon logs now report to millisecond resolution

Signed-off-by: Tiffany Low <the.second.angel@gmail.com>
Upstream-commit: 711e580320a5da5cb33e8f03a17d355b4fb127c1
Component: engine
2015-03-30 12:27:03 -07:00
e5b36a723c Replace aliased imports of logrus, fixes #11762
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
Upstream-commit: 6f4d847046cb4e072de61d042c0266190d73a8c9
Component: engine
2015-03-26 23:22:04 +01:00
bac420baa9 Merge pull request #11566 from tiborvass/carry-10864
Carry 10864: ANSI terminal emulation for windows
Upstream-commit: e09ead98ef41d14d7e3d8784a0edf29d4afd60f5
Component: engine
2015-03-22 18:21:32 -07:00
5b307a9ba4 winconsole: cleanup
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 01a43174dae3b88e264f3139e1a4bf7ee666957f
Component: engine
2015-03-22 15:47:54 -04:00
449ca606a0 Add integration test for unix sock cleanup
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 16309bef6395a50ee2871780b81caed8bc6c498e
Component: engine
2015-03-20 12:34:35 -04:00
cc303ee343 Reduce memory allocation and remove channels
Signed-off-by: Sachin Joshi <sachin_jayant_joshi@hotmail.com>
Upstream-commit: 816d602059f9fd0e0df816c5a55e7f1dc437c8d9
Component: engine
2015-03-19 18:07:56 -07:00
26ddd6db93 Fix daemon shutdown on error after rework of daemon startup
Currently the daemon will not stop on error because the serve API job is
blocking the channel wait for daemon init.  A better way is to run the
blocking serve API job as a goroutine and make sure that error
notification gets back to the main daemon thread (using the already
existing channel) so that clean shutdown can occur on error.

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
Upstream-commit: 459e58ffc9bff8206a860fb63f973e4f07129756
Component: engine
2015-03-17 14:15:00 -04:00
0a4df30772 Move windows console specific implementation in sub package
Signed-off-by: Sachin Joshi <sachin_jayant_joshi@hotmail.com>
Upstream-commit: 898d2763c5430efaf808d7ca8c97b6d792c46c46
Component: engine
2015-03-16 14:04:53 -07:00
78e67ff2df 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>
Upstream-commit: d8c3090dd9abe3f0d95f99c9d8c7660922e9a719
Component: engine
2015-03-16 14:04:49 -07:00
ecba3551ba cleanup defer func
Docker-DCO-1.1-Signed-off-by: Jessie Frazelle <hugs@docker.com> (github: jfrazelle)
Upstream-commit: 17a784aa092fe2ccb6463e4e4d5e0ff5279b4efa
Component: engine
2015-03-10 12:18:43 -07:00
fa734b0de4 Ensure clean engine shutdown on startup errors
Previously on error either from the daemon or from the api it is just
exiting with exit status 1 but not performing a shutdown.
This can produce insconsistent state depending on where the error came
from.

This makes sure that before we exit on error that the engine gets fully
shutdown.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 0e3f2f2ac07c69922bd837f864219a088d243248
Component: engine
2015-03-09 08:40:38 -04:00
f947fbc4ae Add cors header flag and leave boolean flag not changed
Deprecate api-enable-cors

Update docs & man files

Signed-off-by: harry zhang <resouer@163.com>
Upstream-commit: f3dd2db4ff7de1399a49af928cd3eae4fccf8764
Component: engine
2015-03-03 11:21:19 +08:00
cbc491abc7 Fix: docker -d -h start daemon instead of showing help menu
Signed-off-by: Shishir Mahajan <shishir.mahajan@redhat.com>
Upstream-commit: 0ab28c658952267af8e86a5b1055dd4b9cf0ec51
Component: engine
2015-03-02 17:01:56 -05:00
87e987a3ef 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>
Upstream-commit: 08ea03ccb9c6c671b465572e4a5c9a5d1da1fda0
Component: engine
2015-03-02 19:14:22 +08:00