moby/cmd/dockerd
Cory Snider 0f3c5d3893 cmd/dockerd/trap: don't force exit after cleanup
Always calling os.Exit() on clean shutdown may not always be desirable
as deferred functions are not run. Let the cleanup callback decide
whether or not to call os.Exit() itself. Allow the process to exit the
normal way, by returning from func main().

Simplify the trap.Trap implementation. The signal notifications are
buffered in a channel so there is little need to spawn a new goroutine
for each received signal. With all signals being handled in the same
goroutine, there are no longer any concurrency concerns around the
interrupt counter.

Signed-off-by: Cory Snider <csnider@mirantis.com>
2023-04-26 09:51:36 -04:00
..
trap cmd/dockerd/trap: don't force exit after cleanup 2023-04-26 09:51:36 -04:00
cobra.go cli: move cobra customizations into cmd/dockerd 2022-12-14 11:37:51 +01:00
config.go Make default options for newly created networks configurable 2023-03-01 07:58:26 +01:00
config_unix.go Merge pull request #45315 from thaJeztah/deprecate_oom_score_adjust 2023-04-14 00:06:58 +02:00
config_unix_test.go daemon/config: New(): initialize config with platform-specific defaults 2022-08-17 08:54:32 +02:00
config_windows.go daemon/config: New(): initialize config with platform-specific defaults 2022-08-17 08:54:32 +02:00
daemon.go split GetRepository from ImageService 2023-04-09 12:07:57 +02:00
daemon_freebsd.go daemon: move check for CPU-realtime daemon options 2022-03-03 19:50:27 +01:00
daemon_linux.go vendor: github.com/containerd/cgroups/v3 v3.0.1 2023-03-08 20:15:17 +09:00
daemon_linux_test.go Fix listener parsering regression when no addr set 2023-03-09 23:53:05 +00:00
daemon_test.go daemon/config: rename CommonTLSOptions to TLSOptions 2022-12-15 10:44:24 +01:00
daemon_unix.go daemon: deprecate --oom-score-adjust for the daemon 2023-04-13 00:02:39 +02:00
daemon_unix_test.go cmd/dockerd: produce error when using discovery options 2022-01-06 18:28:15 +01:00
daemon_windows.go daemon/config: remove TrustKeyPath, and local utilities 2022-11-28 20:29:19 +01:00
docker.go cmd/dockerd: ignore SIGPIPE using signal.Ignore 2023-04-25 17:50:12 -04:00
docker_unix.go Update to Go 1.17.0, and gofmt with Go 1.17 2021-08-24 23:33:27 +02:00
docker_windows.go daemon/config: remove TrustKeyPath, and local utilities 2022-11-28 20:29:19 +01:00
error.go cli: move cobra customizations into cmd/dockerd 2022-12-14 11:37:51 +01:00
genwinres_windows.go use go-winres for cross to create Windows resources 2022-04-14 19:52:35 +02:00
grpclog.go Silence GRPC logs unless our log level is debug 2023-03-21 21:01:10 +00:00
main_linux_test.go Fix listener parsering regression when no addr set 2023-03-09 23:53:05 +00:00
metrics.go set ReadHeaderTimeout to address G112: Potential Slowloris Attack (gosec) 2022-09-22 12:13:28 +02:00
options.go cli: remove cli/config package, integrate into cmd/dockerd 2022-12-14 12:52:40 +01:00
options_test.go cli: remove cli/config package, integrate into cmd/dockerd 2022-12-14 12:52:40 +01:00
README.md Fix readme doc for dockerd 2016-09-01 14:47:51 +08:00
required.go cli: move cobra customizations into cmd/dockerd 2022-12-14 11:37:51 +01:00
service_unsupported.go Update to Go 1.17.0, and gofmt with Go 1.17 2021-08-24 23:33:27 +02:00
service_windows.go Merge pull request #44287 from thaJeztah/use_SetRecoveryActions 2022-10-14 18:18:47 +00:00

docker.go contains Docker daemon's main function.

This file provides first line CLI argument parsing and environment variable setting.