mirror of
https://github.com/linuxserver/docker-heimdall.git
synced 2025-10-27 03:03:38 +09:00
Adjust for overlayfs chown bug
This commit is contained in:
@@ -39,11 +39,10 @@ RUN \
|
|||||||
/tmp/heimdall.tar.gz -L \
|
/tmp/heimdall.tar.gz -L \
|
||||||
"https://github.com/linuxserver/Heimdall/archive/${HEIMDALL_RELEASE}.tar.gz" && \
|
"https://github.com/linuxserver/Heimdall/archive/${HEIMDALL_RELEASE}.tar.gz" && \
|
||||||
mkdir -p \
|
mkdir -p \
|
||||||
/app/www && \
|
/app/www-tmp && \
|
||||||
tar xf \
|
tar xf \
|
||||||
/tmp/heimdall.tar.gz -C \
|
/tmp/heimdall.tar.gz -C \
|
||||||
/app/www --strip-components=1 && \
|
/app/www-tmp --strip-components=1 && \
|
||||||
mv /app/www/storage/app/searchproviders.yaml /app/www/storage/app/searchproviders.yaml.orig && \
|
|
||||||
echo "**** cleanup ****" && \
|
echo "**** cleanup ****" && \
|
||||||
rm -rf \
|
rm -rf \
|
||||||
/tmp/*
|
/tmp/*
|
||||||
|
|||||||
@@ -39,11 +39,10 @@ RUN \
|
|||||||
/tmp/heimdall.tar.gz -L \
|
/tmp/heimdall.tar.gz -L \
|
||||||
"https://github.com/linuxserver/Heimdall/archive/${HEIMDALL_RELEASE}.tar.gz" && \
|
"https://github.com/linuxserver/Heimdall/archive/${HEIMDALL_RELEASE}.tar.gz" && \
|
||||||
mkdir -p \
|
mkdir -p \
|
||||||
/app/www && \
|
/app/www-tmp && \
|
||||||
tar xf \
|
tar xf \
|
||||||
/tmp/heimdall.tar.gz -C \
|
/tmp/heimdall.tar.gz -C \
|
||||||
/app/www --strip-components=1 && \
|
/app/www-tmp --strip-components=1 && \
|
||||||
mv /app/www/storage/app/searchproviders.yaml /app/www/storage/app/searchproviders.yaml.orig && \
|
|
||||||
echo "**** cleanup ****" && \
|
echo "**** cleanup ****" && \
|
||||||
rm -rf \
|
rm -rf \
|
||||||
/tmp/*
|
/tmp/*
|
||||||
|
|||||||
@@ -39,11 +39,10 @@ RUN \
|
|||||||
/tmp/heimdall.tar.gz -L \
|
/tmp/heimdall.tar.gz -L \
|
||||||
"https://github.com/linuxserver/Heimdall/archive/${HEIMDALL_RELEASE}.tar.gz" && \
|
"https://github.com/linuxserver/Heimdall/archive/${HEIMDALL_RELEASE}.tar.gz" && \
|
||||||
mkdir -p \
|
mkdir -p \
|
||||||
/app/www && \
|
/app/www-tmp && \
|
||||||
tar xf \
|
tar xf \
|
||||||
/tmp/heimdall.tar.gz -C \
|
/tmp/heimdall.tar.gz -C \
|
||||||
/app/www --strip-components=1 && \
|
/app/www-tmp --strip-components=1 && \
|
||||||
mv /app/www/storage/app/searchproviders.yaml /app/www/storage/app/searchproviders.yaml.orig && \
|
|
||||||
echo "**** cleanup ****" && \
|
echo "**** cleanup ****" && \
|
||||||
rm -rf \
|
rm -rf \
|
||||||
/tmp/*
|
/tmp/*
|
||||||
|
|||||||
@@ -3,10 +3,17 @@
|
|||||||
|
|
||||||
# make our folders
|
# make our folders
|
||||||
mkdir -p \
|
mkdir -p \
|
||||||
/app/www/bootstrap/cache \
|
|
||||||
/config/www/{avatars,backgrounds,icons,logs,SupportedApps} \
|
/config/www/{avatars,backgrounds,icons,logs,SupportedApps} \
|
||||||
/config/log/heimdall
|
/config/log/heimdall
|
||||||
|
|
||||||
|
# install heimdall if necessary
|
||||||
|
if [[ -d /app/www-tmp ]]; then
|
||||||
|
echo "New container detected, installing Heimdall"
|
||||||
|
mv /app/www-tmp /app/www
|
||||||
|
cp /app/www/storage/app/searchproviders.yaml /app/www/storage/app/searchproviders.yaml.orig
|
||||||
|
touch /app/set-perms
|
||||||
|
fi
|
||||||
|
|
||||||
# create symlinks
|
# create symlinks
|
||||||
symlinks=(
|
symlinks=(
|
||||||
/app/www/storage/app/public/avatars
|
/app/www/storage/app/public/avatars
|
||||||
@@ -24,27 +31,23 @@ for i in "${symlinks[@]}"; do
|
|||||||
if [[ ! -L "${i}" ]]; then
|
if [[ ! -L "${i}" ]]; then
|
||||||
ln -s /config/www/"$(basename "${i}")" "${i}"
|
ln -s /config/www/"$(basename "${i}")" "${i}"
|
||||||
fi
|
fi
|
||||||
if [[ -d /config/www/"$(basename "${i}")" ]]; then
|
|
||||||
lsiown abc:abc /config/www/"$(basename "${i}")"
|
|
||||||
fi
|
|
||||||
done
|
done
|
||||||
|
|
||||||
# set permissions on new container
|
|
||||||
if [[ ! -f /config/www/searchproviders.yaml ]]; then
|
|
||||||
echo "New container detected, setting permissions"
|
|
||||||
lsiown -R abc:abc \
|
|
||||||
/app \
|
|
||||||
/config
|
|
||||||
fi
|
|
||||||
|
|
||||||
# copy searchproviders if not exists and symlink
|
# copy searchproviders if not exists and symlink
|
||||||
if [[ ! -f /config/www/searchproviders.yaml ]]; then
|
if [[ ! -f /config/www/searchproviders.yaml ]]; then
|
||||||
cp /app/www/storage/app/searchproviders.yaml.orig /config/www/searchproviders.yaml
|
cp /app/www/storage/app/searchproviders.yaml.orig /config/www/searchproviders.yaml
|
||||||
lsiown abc:abc /config/www/searchproviders.yaml
|
|
||||||
fi
|
fi
|
||||||
rm -rf /app/www/storage/app/searchproviders.yaml
|
rm -rf /app/www/storage/app/searchproviders.yaml
|
||||||
ln -s /config/www/searchproviders.yaml /app/www/storage/app/searchproviders.yaml
|
ln -s /config/www/searchproviders.yaml /app/www/storage/app/searchproviders.yaml
|
||||||
|
|
||||||
|
# tidy up install files & set permissions
|
||||||
|
if [[ -d /app/set-perms ]]; then
|
||||||
|
rm /app/set-perms
|
||||||
|
lsiown -R abc:abc \
|
||||||
|
/app/www \
|
||||||
|
/config
|
||||||
|
fi
|
||||||
|
|
||||||
# copy .env if not exists
|
# copy .env if not exists
|
||||||
if [[ ! -f /config/www/.env ]]; then
|
if [[ ! -f /config/www/.env ]]; then
|
||||||
install -g abc -o abc /app/www/.env.example /config/www/.env
|
install -g abc -o abc /app/www/.env.example /config/www/.env
|
||||||
|
|||||||
Reference in New Issue
Block a user