Empty "/tmp/" directory at init

This commit is contained in:
Héctor Molinero Fernández
2020-10-14 20:32:44 +02:00
committed by GitHub
parent 8123a21f3e
commit 5d4abe1caf

View File

@@ -1,13 +1,10 @@
#!/bin/sh
# Clean up /tmp, just in case there is some leftover files from previous run and `--tmpfs` is not specified.
# Without this cleanup or `--tmpfs`, the container will no longer start after 10 startups.
rm -rf /tmp
mkdir /tmp
chmod a+rw /tmp
set -eu
# Remove leftover files
find /tmp/ -mindepth 1 -delete
# Create additional groups
_IFS=${IFS}; IFS=,
for gid in ${UNPRIVILEGED_USER_GROUPS?}; do