mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-28 13:08:38 +00:00
A toolkit for building secure, portable and lean operating systems for containers
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> |
||
---|---|---|
alpine | ||
licensing | ||
requirements | ||
scripts | ||
xhyve | ||
.dockerignore | ||
Dockerfile.qemu | ||
Dockerfile.qemu.armhf | ||
Dockerfile.qemuiso | ||
Makefile | ||
README.md |
Base repo for Moby, codename for the Docker Linux distro
Initial requirements are being driven by the very minimal goal of replacing boot2docker for the new Mac app.
However these requirements are fairly small and the scope is intended to be much broader.
Simple build instructions: use make
to build. make xhyve
will boot it up on a Mac; unless you run with sudo
you will not get any networking.
make qemu
will boot up in qemu in a container.
You can build for arm, some parts still under development, make clean
first, then make qemu-arm
will run in qemu.