adding basic docker builder

This commit is contained in:
thelamer 2019-11-10 12:19:57 -08:00
parent edccba50f4
commit eabb50e24d
3 changed files with 71 additions and 1 deletions

20
docker-build-root/dumper.sh Executable file
View file

@ -0,0 +1,20 @@
#! /bin/sh
# check for dump dir
if [ -d /buildout ]; then
# if there are no files in that directory use 777 perms as root
if [ `find /buildout -prune -empty 2>/dev/null` ]; then
/bin/mkdir -p /buildout/buildout
/bin/cp -r /mnt/* /buildout/buildout/
/bin/chmod 777 -R /buildout/buildout
# match the ownership of the first file we see
else
PERMS=`/usr/bin/find /buildout/* -print -quit |xargs stat -c "%u:%g"`
/bin/mkdir -p /buildout/buildout
/bin/cp -r /mnt/* /buildout/buildout/
/bin/chown $PERMS -R /buildout/buildout
fi
else
/bin/echo "/buildout not found exiting"
exit 1
fi