Add default sysfs settings

This uses the new Alpine sysfs.conf service to allow config of sysfs.

Default file that sets transparent huge pages to only be used on request
to fix #368

Database setting available for user configuration.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
This commit is contained in:
Justin Cormack 2016-08-12 14:13:40 +01:00
parent 39ac362823
commit f4442e388b
4 changed files with 4 additions and 2 deletions

View File

@ -72,7 +72,6 @@ COPY packages/oom/etc /etc/
COPY packages/9pmount-vsock/9pmount-vsock /sbin/
COPY packages/test/etc /etc/
COPY packages/test/mobytest /usr/bin/
COPY packages/sysctl/etc /etc/
COPY packages/iptables/iptables /usr/local/sbin/
COPY packages/containerd/etc /etc/
COPY packages/aws/etc /etc/
@ -97,6 +96,7 @@ RUN \
rc-update add devfs sysinit && \
rc-update add hwdrivers sysinit && \
rc-update add sysfs && \
rc-update add sysfsconf && \
rc-update add fsck && \
rc-update add root && \
rc-update add localmount && \

View File

@ -0,0 +1,2 @@
kernel/mm/transparent_hugepage/enabled = madvise
kernel/mm/transparent_hugepage/defrag = madvise

View File

@ -10,7 +10,7 @@ start() {
ebegin "Configuring host settings from database"
mobyconfig exists etc/sysctl.conf && mobyconfig get etc/sysctl.conf > /etc/sysctl.conf
mobyconfig exists etc/sysfs.conf && mobyconfig get etc/sysfs.conf > /etc/sysfs.conf
mobyconfig exists etc/resolv.conf && mobyconfig get etc/resolv.conf > /etc/resolv.conf
mobyconfig exists etc/hosts && mobyconfig get etc/hosts >> /etc/hosts