Commit graph

238 commits

Author SHA1 Message Date
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
Michael Crosby
c1a40d9279 Merge pull request #9228 from SvenDowideit/update-tlsverify-doc
tlsverify flag has no dash
2014-11-20 15:19:31 -08:00
Sven Dowideit
a0fb8eca30 tlsverify flag has no dash
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2014-11-18 17:42:33 -08:00
Victor Vieux
9a85f60c75 add ID and Hostname in docker info
Signed-off-by: Victor Vieux <vieux@docker.com>
2014-11-17 19:23:41 +00:00
Alexandr Morozov
61e4b4e1d0 Merge pull request #8335 from duglin/Issue5198
Add --log-level support - Issue #5198
2014-11-15 10:53:31 -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
Ahmet Alp Balkan
d4dbb70832 Use USERPROFILE path on Windows as home directory
Signed-off-by: Ahmet Alp Balkan <ahmetb@microsoft.com>
2014-11-14 18:20:54 -08:00
Alexandr Morozov
18d9f1978b Fix vet errors
Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
2014-11-05 08:26:22 -08:00
Lei Jitang
d8b17d785a Fix docker exec command help messages
Signed-off-by: Lei Jitang <leijitang@huawei.com>
2014-10-31 09:36:07 +08:00
Jessie Frazelle
793fb26bff Merge pull request #8510 from hqhq/graphdriver_bug
daemon: resolve the graphdriver to show
2014-10-30 17:40:30 -07:00
Michael Crosby
afade4236d Don't hard code true for auth job
Signed-off-by: Michael Crosby <michael@docker.com>

Conflicts:
	registry/service.go
2014-10-30 19:41:55 -04: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
Qiang Huang
7cf322dffc daemon: resolve the graphdriver to show
graphdriver is not always specified when the log printed, because
it's provided in another thread. This patch will fix this.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2014-10-21 15:00:25 +08: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
Aanand Prasad
19fb942d36 Add DOCKER_TLS_VERIFY environment variable, equivalent to --tlsverify flag
This makes it possible to make the Docker client "secure by default"
without wrapping the binary in a shell alias so that `--tlsverify` is
always passed.

Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2014-10-13 11:49:26 +01: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
Vincent Batts
92df943fbf daemon logging: unifying output and timestamps
A little refactor of the ./pkg/log so engine can have a logger instance

Signed-off-by: Vincent Batts <vbatts@redhat.com>
2014-09-26 14:44:46 -04:00
Alexandr Morozov
ca39a3e36b Merge pull request #7110 from tiborvass/merge-6907
Docker create (rebase of 6907)
2014-09-17 03:23:50 +04:00
Alexander Larsson
3a90004f3c Add "docker create" support
This exposes the already existing "create container" operation.  It is
very similar to "docker run -d" except it doesn't actually start the
container, but just prepares it. It can then be manually started using
"docker start" at any point.

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)

Conflicts:
	api/client/commands.go
	runconfig/parse.go
	server/container.go

Docker-DCO-1.1-Signed-off-by: Tibor Vass <teabee89@gmail.com> (github: tiborvass)
2014-09-16 18:40:24 -04:00
unclejack
fccb026221 add exec to the commands list
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
2014-09-17 01:13:43 +03:00
Ben Firshman
fec81690cc Consolidate documentation for -H option
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2014-09-09 10:12:03 -07:00
Ben Firshman
d128d9e669 Add instructions on how to get help on commands
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2014-09-08 16:09:16 -07:00
Ben Firshman
f3ed7b601f Print consistent help with options and commands
These commands now all output the same thing:

 - docker
 - docker help
 - docker --help
 - docker -h

Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2014-09-08 16:08:50 -07:00
Erik Hollensbe
1ae4c00a19 builder: fix references to jobs in daemon, make builder a first class
package referring to evaluator

Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
2014-08-27 18:52:30 -07:00
Victor Vieux
2e489073d9 Revert "--help option and help command should print to stdout not stderr"
This reverts commit 61b129d818.

Signed-off-by: Victor Vieux <vieux@docker.com>
2014-08-27 18:59:13 +00:00
Victor Vieux
76fd51a478 Merge pull request #6052 from rhatdan/help
--help option and help command should print to stdout not stderr
2014-08-27 11:17:16 -07:00
Alexandr Morozov
660cc4a267
Fix panic for DOCKER_HOST without ://
Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com>
2014-08-26 20:32:10 +04:00
Dan Walsh
61b129d818 --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)
2014-08-21 15:35:20 -04:00
Solomon Hykes
1d10c55aec Move remote API config out of daemon/
Signed-off-by: Solomon Hykes <solomon@docker.com>
2014-08-13 19:25:51 +00:00
Solomon Hykes
1eba59eb24 Check for conflicting daemon config options in NewDaemon
Signed-off-by: Solomon Hykes <solomon@docker.com>
2014-08-13 19:25:51 +00:00
Solomon Hykes
ca11b77471 opts.IPVal returns an error on incorrect input
Signed-off-by: Solomon Hykes <solomon@docker.com>
2014-08-13 19:25:51 +00:00
Solomon Hykes
353b7c8ec7 Parse daemon configuration in daemon.Config.InstallFlags instead of main
Signed-off-by: Solomon Hykes <solomon@docker.com>
2014-08-13 19:25:51 +00:00
Solomon Hykes
6200002669 Helpers to parse lists, IPs, hosts, dns searches from the command line
Signed-off-by: Solomon Hykes <solomon@docker.com>
2014-08-13 19:25:47 +00:00
Solomon Hykes
a4befff533 Move daemonconfig into daemon
Signed-off-by: Solomon Hykes <solomon@docker.com>
2014-08-13 19:09:51 +00:00
Solomon Hykes
63503cafe4 Remove deprecated server/ package
Victory!

Signed-off-by: Solomon Hykes <solomon@docker.com>
2014-08-13 06:56:45 +00:00
Victor Vieux
01995ebebb Merge pull request #7490 from crosbymichael/reexec
Use argv0 as reexec implementation for dockerinit
2014-08-11 18:43:34 -07:00
Michael Crosby
7321067176 Use argv0 as reexec implementation for dockerinit
This changes the way the exec drivers work by not specifing a -driver
flag on reexec.  For each of the exec  drivers they register their own
functions that will be matched aginst the argv 0 on exec and called if
they match.

This also allows any functionality to be added to docker so that the
binary can be reexec'd and any type of function can be called.  I moved
the flag parsing on docker exec to the specific initializers so that the
implementations do not bleed into one another.  This also allows for
more flexability within reexec initializers to specify their own flags
and options.

Signed-off-by: Michael Crosby <michael@docker.com>
2014-08-11 11:47:21 -07:00
Solomon Hykes
a110ce2f28 Rename a method for clarity
Signed-off-by: Solomon Hykes <solomon@docker.com>
2014-08-10 04:33:19 +00:00
Solomon Hykes
b4efcd53e0 Remove unnecessary job "initserverpidfile"
That job was a hacky solution to a real race condition. This removes the
hack without re-introducing the race.

Signed-off-by: Solomon Hykes <solomon@docker.com>
2014-08-06 17:56:11 +00:00
Solomon Hykes
c9f3fd3fc7 Cleanup: refactor shutdown and signal handling facility
This disentangles the following functions, which were previously all mixed together:

* 1) Waiting for jobs to terminate when shutting down
* 2) Handling signals in the Docker daemon
* 3) Per-subsystem cleanup handlers
* 4) pidfile management

Responsibilities are dispatched as follows:

* Signal traps are set in `main`, and trigger `engine.Shutdown`
* `engine.Shutdown` coordinates cleanup by waiting for jobs to complete, and calling shutdown handlers
* To perform cleanup at shutdown, each subsystem registers handlers with `engine.OnShutdown`
* `daemon` is one subsystem, so it registers cleanup via `engine.OnShutdown`.
* `daemon` owns the pidfile, which is used to lock access to `/var/lib/docker`. Part of its cleanup is to remove the pidfile.

Signed-off-by: Solomon Hykes <solomon@docker.com>
2014-08-06 17:56:11 +00:00
Ben Firshman
a49de2c467 Rename DOCKER_CONFIG envvar to DOCKER_CERT_PATH
DOCKER_CONFIG was introduced in #6984.

We may use "config" for other purposes (e.g. #7232). Until we
have made a design decision around how configuration files will
work, DOCKER_CERT_PATH is a much safer name to rely on for future
compatibility.

Docker-DCO-1.1-Signed-off-by: Ben Firshman <ben@firshman.co.uk> (github: bfirsh)
2014-08-04 17:36:53 -07:00
Tianon Gravi
1b95590d06 Add a "daemon" build tag and toggle it with the already-existing "DOCKER_CLIENTONLY" build variable
This works mostly by refactoring our "main" package to be careful about what it imports based on the daemon build tag. :)

Also, I've updated Travis to test "client-only" compilation after it tests the daemon version.

Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
2014-08-04 15:05:12 -06:00
Solomon Hykes
4949e070fb Move kernel version/capabilities detection to NewDaemon
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-07-30 09:26:51 +00:00
Solomon Hykes
e92a9e0b53 Move canonical root path detection to NewDaemon
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-07-30 09:26:51 +00:00
Solomon Hykes
a7d8c732b1 Move TMPDIR symlink cleanup to NewDaemon
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-07-30 09:26:51 +00:00