Commit Graph

230 Commits

Author SHA1 Message Date
4454d2b409 Fix docker exec command help messages
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: d8b17d785a03246cb3a081223a0242469af7d410
Component: engine
2014-10-31 09:36:07 +08:00
68f6d60698 Merge pull request #8510 from hqhq/graphdriver_bug
daemon: resolve the graphdriver to show
Upstream-commit: 793fb26bffd27f4db9324bc38f64fee78d5ba874
Component: engine
2014-10-30 17:40:30 -07:00
ff11c586b2 Don't hard code true for auth job
Signed-off-by: Michael Crosby <michael@docker.com>

Conflicts:
	registry/service.go
Upstream-commit: afade4236d3f15704653132c364d6e7ccc975f8b
Component: engine
2014-10-30 19:41:55 -04:00
3dbfc4607d pkg/reexec: move reexec code to a new package
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
Upstream-commit: acd64278f13ef0ee565f4819951393b9c3fe89eb
Component: engine
2014-10-30 14:48:30 +02:00
2d56e3cbc6 Use logrus everywhere for logging
Fixed #8761

Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
Upstream-commit: 7c62cee51edc91634046b4faa6c6f1841cd53ec1
Component: engine
2014-10-24 15:03:06 -07:00
4d1b4a2f11 Client should use go log package.
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
Upstream-commit: a7aedca4a1afe72d63346b67b577437f175776b9
Component: engine
2014-10-24 13:03:46 -07:00
3cad67f65d 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>
Upstream-commit: 7cf322dffc5e9a4ea495ec08e0b0594cad01da92
Component: engine
2014-10-21 15:00:25 +08:00
421742174b Merge pull request #8588 from dqminh/remove-sslv3
remove sslv3 from server's TLS supported versions
Upstream-commit: 10f78974ca515e3b7224b8cedd1fb3faa94af641
Component: engine
2014-10-17 12:05:48 -04:00
a4666e24dd Merge pull request #8238 from vbatts/vbatts-daemon_timestamps
daemon logging: unifying output and timestamps
Upstream-commit: cb106e74a14a37157b09459965a69c944f9c19f0
Component: engine
2014-10-16 15:55:49 -07:00
8091e3851f 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)
Upstream-commit: 7a062b2b8f7751fbb926e6ddc9f7df8a1b281eb6
Component: engine
2014-10-15 22:39:51 -04:00
17a695568c 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>
Upstream-commit: 712e8da885de00d1957a15c0c7f862fb3b2f6beb
Component: engine
2014-10-14 17:16:45 +00:00
830a3741c6 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>
Upstream-commit: 19fb942d3609f647adeda68c6ca106371c7b32ac
Component: engine
2014-10-13 11:49:26 +01:00
b5b7b0a681 Add libtrust key identity management
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: ea6a480128316be5494284dbb688b58bd65e6f63
Component: engine
2014-09-26 15:52:08 -07:00
50457aefd5 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>
Upstream-commit: 92df943fbf225d78b160babb36e9c6fd38cdc0d0
Component: engine
2014-09-26 14:44:46 -04:00
dc62b54723 Merge pull request #7110 from tiborvass/merge-6907
Docker create (rebase of 6907)
Upstream-commit: ca39a3e36b8b76539bc30f0f4e2761222c50919f
Component: engine
2014-09-17 03:23:50 +04:00
764b128304 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)
Upstream-commit: 3a90004f3c2d86ec849f4674c8046693ea061ed1
Component: engine
2014-09-16 18:40:24 -04:00
9681f2740a add exec to the commands list
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
Upstream-commit: fccb02622183ee93036d4f5068817830f3297ab5
Component: engine
2014-09-17 01:13:43 +03:00
fd1a27eae9 Consolidate documentation for -H option
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
Upstream-commit: fec81690ccaf4c4b81342f632bc1a3ec3ad6b86c
Component: engine
2014-09-09 10:12:03 -07:00
289cb70195 Add instructions on how to get help on commands
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
Upstream-commit: d128d9e669d840160f9f2357324f710d59a7a7d7
Component: engine
2014-09-08 16:09:16 -07:00
2326e18ef0 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>
Upstream-commit: f3ed7b601fa6151868416254e79a18751c5ff024
Component: engine
2014-09-08 16:08:50 -07:00
b36a54587e 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)
Upstream-commit: 1ae4c00a19edb7d3b41c050489e56339833d8e01
Component: engine
2014-08-27 18:52:30 -07:00
676eea0fcd Revert "--help option and help command should print to stdout not stderr"
This reverts commit 61b129d81802e3c988cc0e67e488b24968dd748a.

Signed-off-by: Victor Vieux <vieux@docker.com>
Upstream-commit: 2e489073d94a7e2a5df115704a484c34f0b59f29
Component: engine
2014-08-27 18:59:13 +00:00
91ac365d86 Merge pull request #6052 from rhatdan/help
--help option and help command should print to stdout not stderr
Upstream-commit: 76fd51a4789c1af15d6682a01add3ff86df2f5cf
Component: engine
2014-08-27 11:17:16 -07:00
fef7b9ee0d Fix panic for DOCKER_HOST without ://
Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com>
Upstream-commit: 660cc4a2675d34695406b2506344a2a18f2a59e9
Component: engine
2014-08-26 20:32:10 +04:00
f13f1856df --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: 61b129d81802e3c988cc0e67e488b24968dd748a
Component: engine
2014-08-21 15:35:20 -04:00
fc0d245526 Move remote API config out of daemon/
Signed-off-by: Solomon Hykes <solomon@docker.com>
Upstream-commit: 1d10c55aec891df609d36c90ee6c30adb24c16c4
Component: engine
2014-08-13 19:25:51 +00:00
506b7bed3d Check for conflicting daemon config options in NewDaemon
Signed-off-by: Solomon Hykes <solomon@docker.com>
Upstream-commit: 1eba59eb249b14a0499a52495be2c27b5afc4749
Component: engine
2014-08-13 19:25:51 +00:00
13ed6ae5e4 opts.IPVal returns an error on incorrect input
Signed-off-by: Solomon Hykes <solomon@docker.com>
Upstream-commit: ca11b77471bd3a99b4dbc44b716675ba8174306c
Component: engine
2014-08-13 19:25:51 +00:00
9a4f8cadf4 Parse daemon configuration in daemon.Config.InstallFlags instead of main
Signed-off-by: Solomon Hykes <solomon@docker.com>
Upstream-commit: 353b7c8ec77b30fa83dac5ec0778193f6de8b437
Component: engine
2014-08-13 19:25:51 +00:00
8bd8c43b79 Helpers to parse lists, IPs, hosts, dns searches from the command line
Signed-off-by: Solomon Hykes <solomon@docker.com>
Upstream-commit: 6200002669874f3314856527fecd0c004060913c
Component: engine
2014-08-13 19:25:47 +00:00
ec374f9227 Move daemonconfig into daemon
Signed-off-by: Solomon Hykes <solomon@docker.com>
Upstream-commit: a4befff533cf786df7a4da29798984ebb2268d8c
Component: engine
2014-08-13 19:09:51 +00:00
d27f6d0c6d Remove deprecated server/ package
Victory!

Signed-off-by: Solomon Hykes <solomon@docker.com>
Upstream-commit: 63503cafe4addb7d275244fbcce0e10d67225cc9
Component: engine
2014-08-13 06:56:45 +00:00
7d5baeee4d Merge pull request #7490 from crosbymichael/reexec
Use argv0 as reexec implementation for dockerinit
Upstream-commit: 01995ebebb3f26a2bd1e1131b5794e8b6b6ae18e
Component: engine
2014-08-11 18:43:34 -07:00
2fbe59b1d9 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>
Upstream-commit: 73210671764fc3de133a627205582e069e1ff43d
Component: engine
2014-08-11 11:47:21 -07:00
301a2b811c Rename a method for clarity
Signed-off-by: Solomon Hykes <solomon@docker.com>
Upstream-commit: a110ce2f284d09df3e047b1999a1535770433d5f
Component: engine
2014-08-10 04:33:19 +00:00
c8882ce911 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>
Upstream-commit: b4efcd53e0a62a8ce1080e94e28358ac1a2d6ae2
Component: engine
2014-08-06 17:56:11 +00:00
727879ad53 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>
Upstream-commit: c9f3fd3fc7a4beb97de40ef8da7330b23397d9d3
Component: engine
2014-08-06 17:56:11 +00:00
3b38f1694c 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)
Upstream-commit: a49de2c46713149053b0ee25313c6f7a39273c25
Component: engine
2014-08-04 17:36:53 -07:00
309f9edb73 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)
Upstream-commit: 1b95590d06b20b79041f6d23b9bc35612b82cb51
Component: engine
2014-08-04 15:05:12 -06:00
409af56c06 Move kernel version/capabilities detection to NewDaemon
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
Upstream-commit: 4949e070fbcac1ef9fbeabe59e3f39cdb830e5fd
Component: engine
2014-07-30 09:26:51 +00:00
f3b5291fed Move canonical root path detection to NewDaemon
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
Upstream-commit: e92a9e0b53d296f6e0caa925a56ebbd76b20acaa
Component: engine
2014-07-30 09:26:51 +00:00
504ecb28ba Move TMPDIR symlink cleanup to NewDaemon
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
Upstream-commit: a7d8c732b1760fcb3d5fb99c035a34123809e9cd
Component: engine
2014-07-30 09:26:51 +00:00
190fbe906e Check for OS and root privileges in NewDaemon
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
Upstream-commit: 419b9fe16425c301855aab781e1386f7a227a09d
Component: engine
2014-07-30 09:26:51 +00:00
e25f77248d Move parsing functions to pkg/parsers and the specific kernel handling
functions to pkg/parsers/kernel, and parsing filters to
pkg/parsers/filter. Adjust imports and package references.

Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
Upstream-commit: 4398108433121ce2ac9942e607da20fa1680871a
Component: engine
2014-07-29 13:09:10 -07:00
6ae4c9014c update go import path and libcontainer
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
Upstream-commit: b3ee9ac74e171e00f14027e39278013629e681b8
Component: engine
2014-07-24 22:19:50 +00:00
dd94d217ed Merge pull request #6976 from vbatts/vbatts-early_daemon_pidfile
docker daemon: initialize the daemon pidfile early
Upstream-commit: d0e2d9ec395f1d00b685bf80ab2431b1d8dce161
Component: engine
2014-07-21 14:26:14 -07:00
4e42254381 Closes 6937. Allows setting of docker config dir.
Can now dynamically set the docker config directory through an
environment variable.

export DOCKER_CONFIG=/path/to/docker_config/

Default behavior remains the same, e.g. ~/.docker

Documentation for change added to the https.md docs.

Docker-DCO-1.1-Signed-off-by: James A. Kyle <james@jameskyle.org> (github: jameskyle)
Upstream-commit: c0471ee35aa58a99b423ad914301194e8f3663c1
Component: engine
2014-07-15 15:47:00 -07:00
5bb5de48d2 docker daemon: initialize the daemon pidfile early
fixes https://github.com/dotcloud/docker/issues/6973

Docker-DCO-1.1-Signed-off-by: Vincent Batts <vbatts@redhat.com> (github: vbatts)
Upstream-commit: 848e837698922fed0fa67930aa0b56a96b1b832d
Component: engine
2014-07-12 08:25:05 -04:00
f67899e5d8 update for consistency
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
Upstream-commit: b68111713ddab28485122f149055c865ac4dadaa
Component: engine
2014-07-09 21:48:02 +00:00
f134d9e4d0 Add support for IPv6 addresses in --dns parameters.
Docker-DCO-1.1-Signed-off-by: Jan Pazdziora <jpazdziora@redhat.com> (github: adelton)
Upstream-commit: 899e9e74165b567c157756d56c47d33fac82c05a
Component: engine
2014-07-09 21:48:02 +00:00