Commit Graph

280 Commits

Author SHA1 Message Date
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
f634216d52 Removing -X flag option and autogenerated code to create Dockerversion.go functionality
Addresses #9207

Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
Upstream-commit: 6871b9b16afe46e7566ac2937246b4a64be97269
Component: engine
2015-02-20 05:40:12 +00:00
ab127964ad Shorten help messages for docker cmd flags
In order to fit printed messages to fit 80 chars,
rewording messages for `-H` and `--tls` flags.

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
Upstream-commit: 27a73a98b704b77eaa7c4caebfeaa84743969c67
Component: engine
2015-02-18 22:52:33 -08:00
18202afe1d Move daemon-only flags into the daemon config struct
Signed-off-by: Aidan Hobson Sayers <aidanhs@cantab.net>
Upstream-commit: 06ea5fe979f39645fe0bcac4c830f4ccb7a7b6ae
Component: engine
2015-02-08 12:56:18 +00:00
62119ca587 Export $HOME lookup to pkg/homedir
Signed-off-by: Ahmet Alp Balkan <ahmetb@microsoft.com>
Upstream-commit: f9ae2d4fd4c5b4afb7a2299b93a800f718b63a2a
Component: engine
2015-02-06 11:42:45 -08:00
63b6feced2 Extract $HOME usages into utils.GetHomeDir()
Refactored getHomeDir in docker/docker to GetHomeDir in utils
pkg. Currently covers all use cases on the client-side.

Signed-off-by: Ahmet Alp Balkan <ahmetb@microsoft.com>
Upstream-commit: 6ffb77afd4c3705322417f0673d254038f01a187
Component: engine
2015-02-05 16:13:51 -08:00
013dbb146f Pretty the help text
This modifies the "docker help" text so that it is no wider than 80 chars
and each description fits on one line. This will also try to use ~ when
possible

Added a test to make sure we don't go over 80 chars again.
Added a test to make sure we use ~

Applied rules/tests to all docker commands - not just main help text

Closes #10214

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 2203b37733e76d653cfe3b0ec5870786076adce7
Component: engine
2015-02-04 07:59:16 -08:00
eb1117987a Defer creation of trust key file until needed
Fixes #10442

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: 0eed1f4d8da893d7c91be811197032a064053155
Component: engine
2015-01-29 13:46:12 -08:00
193affd9cc Fix a minor typo
Docker inspect can also be used on images, this patch fixed the
minor typo in file docker/flags.go and docs/man/docker.1.md

Signed-off-by:  DiuDiugirl <sophia.wang@pku.edu.cn>
Upstream-commit: 471006c02f03d9451721dfbd7e3d62f0db0fc7c7
Component: engine
2015-01-24 15:08:33 +08:00
64ed8c80ae Fix nits and defers
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: d55e977cf5963f8ae5efdfbee458727f704be398
Component: engine
2015-01-22 11:22:31 -08:00
d625ce9494 Add TODO lines for windows
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: a34a7930b5c1e9a1e6ddd4a40b1810a86f7d24ab
Component: engine
2015-01-22 10:29:15 -08:00
0d4aa9a72d Add key migration to daemon
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: 007ef161b45dd91afcfb7ef9cd32e6c88dbf196e
Component: engine
2015-01-21 16:55:05 -08:00
c5219e9048 Fix daemon key file location
Fixes #10233

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: 06af013f8bdf5c9af85c4b3f158292d79ab644a5
Component: engine
2015-01-21 16:28:19 -08:00
f0170e8737 Update to docker stats documentation
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: db9b1e3654464b0e7008fbad15d43fbbba87b1a4
Component: engine
2015-01-21 11:44:23 -08:00
a77fb96f4c Add documentation for stats feature
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 76141a00779880368b15ef2a5ffd28a80e4637df
Component: engine
2015-01-20 20:21:47 -08:00
2dcbad59cf Evict stopped containers
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 4f174aa79276c12a1b2b98df2f02d6bee36b7a93
Component: engine
2015-01-20 20:21:46 -08:00
f4d05bcf4d Merge pull request #10124 from duglin/Issue10034
Add the list of possible values for --log-level to help text
Upstream-commit: 1efc940e6f547760e5e8f4648acb120ff19fdc58
Component: engine
2015-01-19 17:09:18 -08:00
07ca876ccc Refactor from feedback
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: 25945a40c4f352a754cbd8dba9c846c7539fe463
Component: engine
2015-01-15 14:05:06 -08:00
c07ed3a544 Add trust key creation on client
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: ac8d964b28f23c9790102462a040054e7857cb26
Component: engine
2015-01-15 14:04:14 -08:00
468fbf0066 Add the list of possible values for --log-level to help text
Closes #10034

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: ed13110e88846694a675696c161ce6456402f3ef
Component: engine
2015-01-15 12:20:41 -08:00
eacdfc7d44 rename a existing container
Closes #3036

Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
Upstream-commit: 21a809d9ae0ef8392f37c9262dca93ff31966e22
Component: engine
2015-01-13 03:27:17 +00:00
5aa04a56fb Deprecating ResolveRepositoryName
Passing RepositoryInfo to ResolveAuthConfig, pullRepository, and pushRepository

Moving --registry-mirror configuration to registry config

Created resolve_repository job

Repo names with 'index.docker.io' or 'docker.io' are now synonymous with omitting an index name.

Adding test for RepositoryInfo

Adding tests for opts.StringSetOpts and registry.ValidateMirror

Fixing search term use of repoInfo

Adding integration tests for registry mirror configuration

Normalizing LookupImage image name to match LocalName parsing rules

Normalizing repository LocalName to avoid multiple references to an official image

Removing errorOut use in tests

Removing TODO comment

gofmt changes

golint comments cleanup.  renaming RegistryOptions => registry.Options, and RegistryServiceConfig => registry.ServiceConfig

Splitting out builtins.Registry and registry.NewService calls

Stray whitespace cleanup

Moving integration tests for Mirrors and InsecureRegistries into TestNewIndexInfo unit test

Factoring out ValidateRepositoryName from NewRepositoryInfo

Removing unused IndexServerURL

Allowing json marshaling of ServiceConfig.  Exposing ServiceConfig in /info

Switching to CamelCase for json marshaling

PR cleanup; removing 'Is' prefix from boolean members.  Removing unneeded json tags.

Removing non-cleanup related fix for 'localhost:[port]' in splitReposName

Merge fixes for gh9735

Fixing integration test

Reapplying #9754

Adding comment on config.IndexConfigs use from isSecureIndex

Remove unused error return value from isSecureIndex

Signed-off-by: Don Kjer <don.kjer@gmail.com>

Adding back comment in isSecureIndex

Signed-off-by: Don Kjer <don.kjer@gmail.com>
Upstream-commit: 568f86eb186731b907b659e4ec64bda21c2fe31d
Component: engine
2015-01-08 20:14:58 +00:00
f82eddabc6 --help option and help command should print to stdout not stderr
--help and help are successful commands so output should not go to error.

    QE teams have requested this change, also users doing docker help | less
    or docker run --help | less would expect this to work.

    Usage statement should only be printed when the user asks for it.
    Errors should print error message and then suggest the docker COMMAND --help
    command to see usage information.

    The current behaviour causes the user to have to search for the error message
    and sometimes scrolls right off the screen.  For example a error on a
    "docker run" command is very difficult to diagnose.

    Finally erros should always exit with a non 0 exit code, if the user
    makes a CLI error.

Docker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)
Upstream-commit: a2b529ead21e6ab9eafcb1b1d2437c725c43a06a
Component: engine
2015-01-06 13:40:14 +01:00
f7e2fcdfb9 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>
Upstream-commit: ae9bd580af55992974fcb94f73f72cc3b2257fec
Component: engine
2014-11-20 16:09:06 -08:00
271208f1aa Merge pull request #9228 from SvenDowideit/update-tlsverify-doc
tlsverify flag has no dash
Upstream-commit: c1a40d927999a7e019f1952c2b140ef6e4a76171
Component: engine
2014-11-20 15:19:31 -08:00
7973650734 tlsverify flag has no dash
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
Upstream-commit: a0fb8eca30fd97aaa592268b4b6e8ac7737b78ac
Component: engine
2014-11-18 17:42:33 -08:00
f066184384 add ID and Hostname in docker info
Signed-off-by: Victor Vieux <vieux@docker.com>
Upstream-commit: 9a85f60c75f2017b14ed5e7f2bae5dc4961cb74c
Component: engine
2014-11-17 19:23:41 +00:00
18dd4cded4 Merge pull request #8335 from duglin/Issue5198
Add --log-level support - Issue #5198
Upstream-commit: 61e4b4e1d015032e6e7ee17658023c4101be3e36
Component: engine
2014-11-15 10:53:31 -08:00
40988ed79f 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>
Upstream-commit: 2facc0467336a80f48c765dbdbd803055a431aa9
Component: engine
2014-11-15 09:00:48 -08:00
a64d9e402a Use USERPROFILE path on Windows as home directory
Signed-off-by: Ahmet Alp Balkan <ahmetb@microsoft.com>
Upstream-commit: d4dbb708320e59efa91b077303c87f9e9513cd91
Component: engine
2014-11-14 18:20:54 -08:00
07c8c2eea7 Fix vet errors
Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
Upstream-commit: 18d9f1978b311ff9cadce9f0237313db14502f9f
Component: engine
2014-11-05 08:26:22 -08:00