Commit graph

210 commits

Author SHA1 Message Date
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
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
660cc4a267
Fix panic for DOCKER_HOST without ://
Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com>
2014-08-26 20:32:10 +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
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
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
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
Solomon Hykes
419b9fe164 Check for OS and root privileges in NewDaemon
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-07-30 09:26:51 +00:00
Erik Hollensbe
4398108433 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)
2014-07-29 13:09:10 -07:00
Victor Vieux
b3ee9ac74e update go import path and libcontainer
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
2014-07-24 22:19:50 +00:00
Victor Vieux
d0e2d9ec39 Merge pull request #6976 from vbatts/vbatts-early_daemon_pidfile
docker daemon: initialize the daemon pidfile early
2014-07-21 14:26:14 -07:00
James Kyle
c0471ee35a 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)
2014-07-15 15:47:00 -07:00
Vincent Batts
848e837698 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)
2014-07-12 08:25:05 -04:00
Victor Vieux
b68111713d update for consistency
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
2014-07-09 21:48:02 +00:00
Jan Pazdziora
899e9e7416 Add support for IPv6 addresses in --dns parameters.
Docker-DCO-1.1-Signed-off-by: Jan Pazdziora <jpazdziora@redhat.com> (github: adelton)
2014-07-09 21:48:02 +00:00
Victor Vieux
170609e369 Merge pull request #6720 from fabiofalci/relax_dns_search
Relax dns search to accept empty domain
2014-07-07 15:12:29 -07:00
Fabio Falci
804b00cd7d Relax dns search to accept empty domain
In that case /etc/resolv.conf will be generated with no search
option. Usage: --dns-search=.

Docker-DCO-1.1-Signed-off-by: Fabio Falci <fabiofalci@gmail.com> (github: fabiofalci)
2014-07-04 09:33:53 +01:00
Matthew Heon
4318802f64 Error if Docker daemon starts with BTRFS graph driver and SELinux enabled
The Docker btrfs graph driver does not interact well with SELinux at present.
If btrfs mounts the same file in several locations, the same SELinux label will
be applied to all mountpoints. In the context of the graph driver, things such
as shared libraries become inaccessible to containers due to SELInux, causing
all dynamically linked applications to fail when run in a container.

Consequently, error when we detect the daemon is being run with SELinux enabled
and the btrfs driver. Documentation has been added for this behavior.

Docker-DCO-1.1-Signed-off-by: Matthew Heon <mheon@redhat.com> (github: mheon)
2014-07-03 08:11:18 -04:00
Jiří Župka
2fcbfb5a66 Adds check if default ip address is correct format.
It avoids hidden error when ports are redirected from
container to host using -p host_port:guest_port.

Docker-DCO-1.1-Signed-off-by: Jiří Župka <jzupka@redhat.com> (github: jzupka)
2014-06-27 15:55:20 +02:00
Erik Hollensbe
05f293e65e Add mutex warning when specifying -icc or -ip-forward and -iptables=false
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
2014-06-24 15:49:35 -07:00
Sven Dowideit
f54823bf05 Add Sockets (-H) list to docker -D info.
This will allow us to _know_ what the user's -H settings are, which may
be useful for debugging later.

Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@fosiki.com> (github: SvenDowideit)
2014-06-24 12:25:17 +10:00
Jonathan Boulle
6d14e9f1ac be consistent in capitalization of Docker
Docker-DCO-1.1-Signed-off-by: Jonathan Boulle <jonathanboulle@gmail.com> (github: jonboulle)
2014-06-20 14:05:46 -07:00
Alexander Larsson
822ea97ffc Add --storage-opt graph driver option and pass through to driver
This lets you add storage specific options for the daemon.

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
2014-06-05 10:42:27 +02:00
Victor Vieux
704e9f9ff0 Merge pull request #5761 from SvenDowideit/pr_out_tell_the_user_not_to_run_from_osx
tell the user not to run -d from OSX
2014-05-16 16:52:08 -07:00
SvenDowideit
fe445a2447 tell the user not to run from OSX
Docker-DCO-1.1-Signed-off-by: SvenDowideit <SvenDowideit@home.org.au> (github: SvenDowideit)
2014-05-13 12:51:00 +10:00
Victor Vieux
937f8f2d81 move acceptconnections as builtin
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
2014-05-13 01:53:38 +00:00
Victor Vieux
f3736265fd make listen buffer optional
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
2014-05-13 01:51:41 +00:00
Victor Vieux
b622da3cfe improve some usages
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
2014-05-06 21:32:12 +00:00
Victor Vieux
51933bd5e1 Merge pull request #5575 from vieux/pr-5428 2014-05-05 13:48:36 -07:00
Guillaume J. Charmes
5f301191cf Merge pull request #5496 from unclejack/check_if_root
check if the daemon is run as root on startup
2014-05-05 10:13:17 -07:00
Victor Vieux
328d65dcff remove fixme
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
2014-05-03 00:54:52 +00:00