This will make it fail correctly on old versions that are unsupported.
Allow override of download host.
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
Docker needs 10s at least for containers to be allowed to shut down,
so allow 15s maximum between SIGTERM and SIGKILL.
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
This allows plain `swarm init` to work. We do not support multi
node clusters yet as there is no way to reqach this address from
externally at present.
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
Use `make DOCKER_VERSION=xxx` to override version. Note that
as install process and packaging may vary this may not work.
Use `make DOCKER_EXPERIMENTAL=0` to build from either release
binaries, if version is a final release or test binaries for
release candidates.
Building experimental is still the default.
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
For the "no error if existing" rather than "make parents" affect. Otherwise:
moby:~# service docker restart
* Stopping docker
* Starting Docker ...
mkdir: can't create directory '/run/log': File exists
[ ok ]
Signed-off-by: Ian Campbell <ian.campbell@docker.com>
Building on Debian where /bin/sh is dash:
make[1]: Leaving directory '/home/ijc/development/Docker/moby.git/alpine/packages/docker/docker.git'
mkdir -p bin
cp docker.git/bundles/latest/binary-daemon/{dockerd,docker-runc} bin/
cp: cannot stat 'docker.git/bundles/latest/binary-daemon/{dockerd,docker-runc}': No such file or directory
Makefile:9: recipe for target 'bin' failed
Pasting the construct into a file and running checkbashsisms:
possible bashism in foo line 2 (brace expansion):
cp docker.git/bundles/latest/binary-daemon/{dockerd,docker-runc} bin/
Signed-off-by: Ian Campbell <ian.campbell@docker.com>
Reconfigure chronyd in a udhcpc post-bound hook and restart it, but use
conditionalrestart so it is not started if it isn't running, which is the case
during boot when this hook happens from init.d/networking via ifup, running
"service ... start" in that context results in the daemon running but the
service db saying it isn't.
Doing it in the udhcpc hook leaves a nice hole where support for getting the
NTP server via DHCP can fit in once it is available.
This also switches from using "initstepslew" to "makestep", the former was
responsible for the long delay starting chronyd (meaning we can now drop
"before chronyd" from Docker's init dependencies), while the later will force a
step if the time is out by more than the configured amount (half a second
here), meaning it will be corrected on resume. The rest of the time it chrony
will do the usual slewing to keep the clock accurate. Passing -1 as the limit
to "makestep" ensures the step will always occur, if it were positive it would
only be done that number of times.
We add "iburst" and "minpoll 2" to the default configuration file to speed up
initial sync and resync after sleep respectively, resync after sleep happens in
a couple of seconds. In "ntp=gateway" mode we also patch in "trust", this isn't
in the default config file since we won't be so sure about DHCP provided
servers, but when talking to a host provided NTP we want to use its time (for
sync accross host mounts) even if it has a crazy idea about what the time is.
With this we can also remove the 15min ntp sync, which in turn gets rid of the
need for cron.
Signed-off-by: Ian Campbell <ian.campbell@docker.com>