Commit Graph

46 Commits

Author SHA1 Message Date
Ian Campbell
916d920bfb Direct syslog to log to /var/run/syslog.vsock on mac
Avoid doing this on non-Docker-for-{Mac,Win} editions (which don't run vsudd)
by checking for vsudd.pid and avoid doing it on Docker-for-Win (for now) by
checking for /sys/bus/vmbus (as /etc/init.d/vsudd does too).

Ideally we would just check for /var/run/syslog.vsock but this may not have
arrived yet (typically vsudd is now started immediately prior to syslog and it
forks via start-stop-daemon and thus before it creates the socket). Since
syslogd will reopen as needed we don't want to delay boot either here or in the
vsudd initscript to await the arrival of the socket.

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2016-07-04 14:47:02 +01:00
Daniel Hiltgen
56c6c3a0a9 Add support for console on tty1
When running moby under other hypervisors, requiring troubleshooting on
the serial port can be painful.  This change enables console support on
tty1 similar to the way prior boot2docker images worked.
2016-06-16 17:17:34 -07:00
Ian Campbell
6545a19b8e Add /etc/mke2fs.conf reenabling the uninit_bg feature
Without this the mkfs.ext4 on Moby on a virtualised OSX goes from ~10s to ~90s.

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2016-06-10 18:28:57 +01:00
Rolf Neugebauer
81c8a2a53d config: overwrite resolv.conf and interfaces from database
Allow the host to configure a static IP address for eth0 by setting the
following DB keys:
- net/config: "static" (default or not set -> dhcp)
- net/address: IP address
- net/netmask: netmask in dot notation
- net/gateway: default gateway

Also allow overwriting/setting "/etc/resolve.conf" by writing to
the "etc/resolv.conf" key.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2016-05-30 10:01:42 +02:00
David Scott
da954e93e3 tap-vsockd: add tap-vsockd service to bring up eth1
The tap-vsockd service is started from eth1's pre-up script.

On the Mac: the bind of the AF_HYPERV socket fails, and eth1 is skipped.
On Windows: if there is no database then eth1 is skipped.
On Windows: if the database has network=native then eth1 is brought up.

Signed-off-by: David Scott <dave.scott@docker.com>
2016-05-21 21:58:38 +01:00
David Scott
47ff9eb817 In a dual NIC configuration, use eth1 for routing
The NIC with the lowest metric is used for routing, while the NIC with
the highest index is used for DNS. Set the metric of eth1 to 199, so it
is higher-priority than eth0, so we use eth1 for everything in a dual
NIC configuration.

Signed-off-by: David Scott <dave.scott@docker.com>
2016-04-18 18:45:32 +01:00
David Scott
6ca504f192 Configure a second possible NIC (eth1)
This makes it possible to have one NIC controlled by vmnet and another
controlled by slirp.

If eth1 doesn't exist then a harmless message is generated during
bootup: (with no appreciable delay)

 * Starting networking ... *   lo ... [ ok ]
 *   eth0 ... [ ok ]
 *   eth1 ...ip: ioctl 0x8913 failed: No such device
 [ !! ]

Signed-off-by: David Scott <dave.scott@docker.com>
2016-04-16 19:31:32 +01:00
Justin Cormack
be2612bfd8 do not set hostname in dhcp
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-03-01 14:57:11 +00:00
Magnus Skjegstad
b084fc0301 udhcpc: set retransmission timeout to 1 sec (was 3 sec), retry if no offer after 3 sec (was 20 sec)
Signed-off-by: Magnus Skjegstad <magnus@skjegstad.com>
2016-01-28 21:24:37 +01:00
Justin Cormack
c1f6b1c2ad inline some config files
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-01-25 11:47:35 +00:00
Justin Cormack
5acf36affa set hostname from database if available
Signed-off-by: Justin Cormack <justin.cormack@unikernel.com>
2016-01-18 17:09:23 +00:00
Justin Cormack
86bf66dc25 add arm console to securetty
Signed-off-by: Justin Cormack <justin.cormack@unikernel.com>
2016-01-14 15:21:15 +00:00
Justin Cormack
49b696967e more arm fixes
Signed-off-by: Justin Cormack <justin.cormack@unikernel.com>
2016-01-13 17:48:42 +00:00
Justin Cormack
478677a809 simplify inittab
Signed-off-by: Justin Cormack <justin.cormack@unikernel.com>
2016-01-13 16:01:36 +00:00
Justin Cormack
3f00b547ac move 9pinit to packages
Signed-off-by: Justin Cormack <justin.cormack@unikernel.com>
2015-12-23 13:18:43 +00:00
Justin Cormack
a7cc326f1c move automount to packages
Signed-off-by: Justin Cormack <justin.cormack@unikernel.com>
2015-12-23 13:02:25 +00:00
Justin Cormack
635a44ab99 use standard chronyd config file, but make sure it starts after docker as it is slow
Signed-off-by: Justin Cormack <justin.cormack@unikernel.com>
2015-12-23 12:50:35 +00:00
Justin Cormack
9276dc01fd More allowed drive types
Signed-off-by: Justin Cormack <justin.cormack@unikernel.com>
2015-12-21 09:50:42 +00:00
Justin Cormack
6670833de8 move config files under packages
Signed-off-by: Justin Cormack <justin.cormack@unikernel.com>
2015-12-18 16:41:29 +00:00
Justin Cormack
6cce9a78e9 Use official docker image instead of Alpine package; switch to aufs by default
Signed-off-by: Justin Cormack <justin.cormack@unikernel.com>
2015-12-18 14:13:34 +00:00
Justin Cormack
2a0f80b497 clean up rc files
Signed-off-by: Justin Cormack <justin.cormack@unikernel.com>
2015-12-18 10:46:34 +00:00
Justin Cormack
06c53c2fe2 add /etc/securetty now upstream has one
Signed-off-by: Justin Cormack <justin.cormack@unikernel.com>
2015-12-17 10:45:20 +00:00
Justin Cormack
cef96a9d5b use first partition if several
Signed-off-by: Justin Cormack <justin.cormack@unikernel.com>
2015-12-16 14:49:58 +00:00
Justin Cormack
86795cc605 identify the partition types for mounting; fixes issues with some beta users where this changed
Signed-off-by: Justin Cormack <justin.cormack@unikernel.com>
2015-12-15 16:54:06 +00:00
Justin Cormack
5d199b9591 support /dev/vda as a disk as well as /dev/sda and mount one for xhyve run
Signed-off-by: Justin Cormack <justin.cormack@unikernel.com>
2015-12-15 11:22:19 +00:00
Justin Cormack
6d0d3616a7 fix automount script, as the settings do not persist, as fstab changes dropped
Signed-off-by: Justin Cormack <justin.cormack@unikernel.com>
2015-12-14 18:16:08 +00:00
Justin Cormack
db56b320a4 use the standard alpine tool to setup disk instead
Signed-off-by: Justin Cormack <justin.cormack@unikernel.com>
2015-12-14 15:40:58 +00:00
Justin Cormack
deb0043f9d replace automount script with a more rebust one, will later replace with alpine setup-disk. fix #378
Signed-off-by: Justin Cormack <justin.cormack@unikernel.com>
2015-12-14 14:56:23 +00:00
Justin Cormack
4e6c850e7e slight hack to start up chronyd in the background as it is very slow
Signed-off-by: Justin Cormack <justin.cormack@unikernel.com>
2015-12-11 14:58:21 +00:00
Justin Cormack
66c349a0db advertise moby hostname not always docker.local.
Signed-off-by: Justin Cormack <justin.cormack@unikernel.com>
2015-12-11 14:42:37 +00:00
Justin Cormack
88858f855c fix moby ascii art
Signed-off-by: Justin Cormack <justin.cormack@unikernel.com>
2015-12-11 14:38:50 +00:00
Justin Cormack
4d19e8e097 fix typo
Signed-off-by: Justin Cormack <justin.cormack@unikernel.com>
2015-12-11 13:56:31 +00:00
Justin Cormack
8f676270a6 use findfs not blkid here
Signed-off-by: Justin Cormack <justin.cormack@unikernel.com>
2015-12-11 10:28:28 +00:00
Justin Cormack
7694168a7c Revert "work around busybox blkid" now we have upstream blkid
This reverts commit 6f8ecb38f1.
2015-12-11 09:54:08 +00:00
Justin Cormack
1b5c4fc81b work around busybox blkid
Signed-off-by: Justin Cormack <justin.cormack@unikernel.com>
2015-12-11 09:43:22 +00:00
Justin Cormack
69b15d551e fix process startup, now runs docker correctly
Signed-off-by: Justin Cormack <justin.cormack@unikernel.com>
2015-12-10 16:25:04 +00:00
Justin Cormack
bc0288a2eb Add in startup code for the pinata specific tools. Should be split out as packages later
Signed-off-by: Justin Cormack <justin.cormack@unikernel.com>
2015-12-10 11:26:58 +00:00
Justin Cormack
d82559a915 add fstab for docker mac to mount 9p filesystems, harmless if fails
Signed-off-by: Justin Cormack <justin.cormack@unikernel.com>
2015-12-09 15:51:48 +00:00
Justin Cormack
47b98507e3 make chronyd start after docker as it is slow starting
Signed-off-by: Justin Cormack <justin.cormack@unikernel.com>
2015-12-07 19:28:52 +00:00
Justin Cormack
ce13c65017 fix backslashes in /etc/issue and add a motd back
Signed-off-by: Justin Cormack <justin.cormack@unikernel.com>
2015-12-07 18:48:51 +00:00
Justin Cormack
cd0366a560 customise issue not motd
Signed-off-by: Justin Cormack <justin.cormack@unikernel.com>
2015-12-07 18:26:48 +00:00
Justin Cormack
a75e2b142b Moby now runs Docker
Signed-off-by: Justin Cormack <justin.cormack@unikernel.com>
2015-12-07 18:14:17 +00:00
Justin Cormack
62ad646081 vendor upstream sysfs init
Signed-off-by: Justin Cormack <justin.cormack@unikernel.com>
2015-12-07 17:14:13 +00:00
Justin Cormack
717a378df9 Configure network and timezone
Signed-off-by: Justin Cormack <justin.cormack@unikernel.com>
2015-12-07 15:54:54 +00:00
Justin Cormack
050ee55ffa fix up files that Docker bind mounts in so they are not set to desired values
Signed-off-by: Justin Cormack <justin.cormack@unikernel.com>
2015-12-07 15:43:39 +00:00
Justin Cormack
bc24228bc3 clean up override files, add inittab
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2015-12-02 12:50:06 +00:00