Verified Commit a77aaddd authored by Karel Koci's avatar Karel Koci 🤘
Browse files

imgs/base-alpine: fix mount of /dev/shm

The Alpine Linux creates /dev/shm using init script devfs but that is
not run in container. It won't even run correctly in container. That
makes /dev/shm unavailable but we need it in some cases and thus this is
hacky script that adds just very small init script that creates it.
parent 7a747bbf
...@@ -7,10 +7,12 @@ ...@@ -7,10 +7,12 @@
################################################################################## ##################################################################################
set -e set -e
# Make wait scripts executable # Make wait and init scripts executable
for script in wait4boot wait4network; do for script in wait4boot wait4network; do
chmod +x "/bin/$script" chmod +x "/bin/$script"
done done
chmod +x "/etc/init.d/devshm"
rc-update add devshm boot
wait4boot wait4boot
......
#!/sbin/openrc-run
start() {
mkdir -p /dev/shm
mount -n -t tmpfs -o noexec,nosuid,nodev,mode=1777 shm /dev/shm
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment