This commit in conjunction with a libnetwork side commit, cleans up the libnetwork SetClusterProvider logic interaction. The previous code was inducing libnetwork to spawn several go routines that were racing between each other during the agent init and close. A test got added to verify that back to back swarm init and leave are properly processed and not raise crashes Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com> Upstream-commit: e2ec006797fa14f59bcf7b9c23505ccdf1d3ded3 Component: engine
docker.go contains Docker daemon's main function.
This file provides first line CLI argument parsing and environment variable setting.