aboutsummaryrefslogtreecommitdiffstats
path: root/main/lxc/alpine-template-mount-shm.patch
blob: 69eb8b3a2244a54adcad7e0b4d73f98f66cefa15 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
From 48938fe71da106587f94654246ea13d284c50291 Mon Sep 17 00:00:00 2001
From: Jakub Jirutka <jakub@jirutka.cz>
Date: Wed, 12 Oct 2016 13:32:18 +0200
Subject: [PATCH] lxc-alpine: mount /dev/shm as tmpfs

Signed-off-by: Jakub Jirutka <jakub@jirutka.cz>
---
 config/templates/alpine.common.conf.in | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/config/templates/alpine.common.conf.in b/config/templates/alpine.common.conf.in
index 55ea3d2..1be61f7 100644
--- a/config/templates/alpine.common.conf.in
+++ b/config/templates/alpine.common.conf.in
@@ -19,5 +19,8 @@ lxc.cap.drop = sys_tty_config
 lxc.cap.drop = syslog
 lxc.cap.drop = wake_alarm
 
-# Mount tmpfs under /run.
+# Mount /run as tmpfs.
 lxc.mount.entry=run run tmpfs rw,nodev,relatime,mode=755 0 0
+
+# Mount /dev/shm as tmpfs; needed for building python and possibly other packages.
+lxc.mount.entry=shm dev/shm tmpfs rw,nodev,noexec,nosuid,relatime,mode=1777,create=dir 0 0