Skip to content
This repository was archived by the owner on Jan 4, 2022. It is now read-only.

Commit 1821aab

Browse files
ibuildthecloudAlena Prokharchyk
authored andcommitted
Unmount mounts we don't want
1 parent d6eb7b9 commit 1821aab

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

package/entry.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@ EOF
4141
fi
4242

4343
if [ "$1" == "kubelet" ]; then
44+
for i in $(DOCKER_API_VERSION=1.22 ./docker info 2>&1 | grep -i 'docker root dir' | cut -f2 -d:) /var/lib/docker /run /var/run; do
45+
for m in $(tac /proc/mounts | awk '{print $2}' | grep ^${i}/); do
46+
umount $m || true
47+
done
48+
done
4449
mount --rbind /host/dev /dev
4550
FQDN=$(hostname --fqdn || hostname)
4651
exec "$@" --hostname-override ${FQDN}

0 commit comments

Comments
 (0)