Skip to content

Commit

Permalink
lxc-alpine: completely rewrite the template script
Browse files Browse the repository at this point in the history
New template script is more readable and robust, uses cache and external
LXC config file as other templates.

Signed-off-by: Jakub Jirutka <jakub@jirutka.cz>
  • Loading branch information
jirutka committed Feb 26, 2016
1 parent 95f0d48 commit 6515faa
Show file tree
Hide file tree
Showing 5 changed files with 493 additions and 320 deletions.
2 changes: 2 additions & 0 deletions config/templates/Makefile.am
Expand Up @@ -5,6 +5,8 @@ EXTRA_DIST = common.seccomp
SUBDIRS = common.conf.d

templatesconfig_DATA = \
alpine.common.conf \
alpine.userns.conf \
archlinux.common.conf \
archlinux.userns.conf \
centos.common.conf \
Expand Down
20 changes: 20 additions & 0 deletions config/templates/alpine.common.conf.in
@@ -0,0 +1,20 @@
# This derives from the global common config.
lxc.include = @LXCTEMPLATECONFIG@/common.conf

# Doesn't support consoles in /dev/lxc/.
lxc.devttydir =

# Drop another (potentially) harmful capabilities.
lxc.cap.drop = audit_write
lxc.cap.drop = ipc_owner
lxc.cap.drop = mknod
lxc.cap.drop = setfcap
lxc.cap.drop = setpcap
lxc.cap.drop = sys_nice
lxc.cap.drop = sys_pacct
lxc.cap.drop = sys_ptrace
lxc.cap.drop = sys_rawio
lxc.cap.drop = sys_resource
lxc.cap.drop = sys_tty_config
lxc.cap.drop = syslog
lxc.cap.drop = wake_alarm
2 changes: 2 additions & 0 deletions config/templates/alpine.userns.conf.in
@@ -0,0 +1,2 @@
# This derives from the global userns config.
lxc.include = @LXCTEMPLATECONFIG@/userns.conf
2 changes: 2 additions & 0 deletions configure.ac
Expand Up @@ -647,6 +647,8 @@ AC_CONFIG_FILES([
config/init/upstart/Makefile
config/etc/Makefile
config/templates/Makefile
config/templates/alpine.common.conf
config/templates/alpine.userns.conf
config/templates/archlinux.common.conf
config/templates/archlinux.userns.conf
config/templates/centos.common.conf
Expand Down

0 comments on commit 6515faa

Please sign in to comment.