mirror of
https://github.com/hoellen/dockerfiles.git
synced 2025-04-20 04:19:18 +00:00
nextcloud: fix chown (closes #89)
This commit is contained in:
parent
1de4580cb5
commit
33a9a79065
@ -1,15 +1,15 @@
|
|||||||
FROM orax/alpine-armhf:edge
|
FROM orax/alpine-armhf:edge
|
||||||
MAINTAINER Wonderfall <wonderfall@schrodinger.io>
|
MAINTAINER Wonderfall <wonderfall@schrodinger.io>
|
||||||
|
|
||||||
ARG NEXTCLOUD_VERSION=11.0.0RC2
|
ARG NEXTCLOUD_VERSION=11.0.1
|
||||||
ARG GNU_LIBICONV_VERSION=1.14
|
ARG GNU_LIBICONV_VERSION=1.14
|
||||||
ARG GPG_nextcloud="2880 6A87 8AE4 23A2 8372 792E D758 99B9 A724 937A"
|
ARG GPG_nextcloud="2880 6A87 8AE4 23A2 8372 792E D758 99B9 A724 937A"
|
||||||
|
|
||||||
ENV UID=991 GID=991 \
|
ENV UID=991 GID=991 \
|
||||||
UPLOAD_MAX_SIZE=10G \
|
UPLOAD_MAX_SIZE=10G \
|
||||||
APC_SHM_SIZE=128M \
|
APC_SHM_SIZE=64M \
|
||||||
OPCACHE_MEM_SIZE=128 \
|
OPCACHE_MEM_SIZE=64 \
|
||||||
REDIS_MAX_MEMORY=64mb \
|
REDIS_MAX_MEMORY=32mb \
|
||||||
CRON_PERIOD=15m \
|
CRON_PERIOD=15m \
|
||||||
TZ=Etc/UTC \
|
TZ=Etc/UTC \
|
||||||
DB_TYPE=sqlite3 \
|
DB_TYPE=sqlite3 \
|
||||||
@ -83,9 +83,9 @@ RUN echo "@commuedge https://nl.alpinelinux.org/alpine/edge/community" >> /etc/a
|
|||||||
&& echo "extension=smbclient.so" > /etc/php7/conf.d/00_smbclient.ini \
|
&& echo "extension=smbclient.so" > /etc/php7/conf.d/00_smbclient.ini \
|
||||||
&& mkdir /nextcloud \
|
&& mkdir /nextcloud \
|
||||||
&& NEXTCLOUD_TARBALL="nextcloud-${NEXTCLOUD_VERSION}.tar.bz2" \
|
&& NEXTCLOUD_TARBALL="nextcloud-${NEXTCLOUD_VERSION}.tar.bz2" \
|
||||||
&& wget -q https://download.nextcloud.com/server/prereleases/${NEXTCLOUD_TARBALL} \
|
&& wget -q https://download.nextcloud.com/server/releases/${NEXTCLOUD_TARBALL} \
|
||||||
&& wget -q https://download.nextcloud.com/server/prereleases/${NEXTCLOUD_TARBALL}.sha256 \
|
&& wget -q https://download.nextcloud.com/server/releases/${NEXTCLOUD_TARBALL}.sha256 \
|
||||||
&& wget -q https://download.nextcloud.com/server/prereleases/${NEXTCLOUD_TARBALL}.asc \
|
&& wget -q https://download.nextcloud.com/server/releases/${NEXTCLOUD_TARBALL}.asc \
|
||||||
&& wget -q https://nextcloud.com/nextcloud.asc \
|
&& wget -q https://nextcloud.com/nextcloud.asc \
|
||||||
&& echo "Verifying both integrity and authenticity of ${NEXTCLOUD_TARBALL}..." \
|
&& echo "Verifying both integrity and authenticity of ${NEXTCLOUD_TARBALL}..." \
|
||||||
&& CHECKSUM_STATE=$(echo -n $(sha256sum -c ${NEXTCLOUD_TARBALL}.sha256) | tail -c 2) \
|
&& CHECKSUM_STATE=$(echo -n $(sha256sum -c ${NEXTCLOUD_TARBALL}.sha256) | tail -c 2) \
|
||||||
|
@ -10,11 +10,16 @@ sed -i -e "s/<UPLOAD_MAX_SIZE>/$UPLOAD_MAX_SIZE/g" /etc/nginx/nginx.conf /etc/ph
|
|||||||
ln -sf /config/config.php /nextcloud/config/config.php &>/dev/null
|
ln -sf /config/config.php /nextcloud/config/config.php &>/dev/null
|
||||||
ln -sf /apps2 /nextcloud &>/dev/null
|
ln -sf /apps2 /nextcloud &>/dev/null
|
||||||
|
|
||||||
for dir in /nextcloud /data /config /apps2 /etc/nginx /etc/php7 /var/log /var/lib/nginx /var/lib/redis /tmp /etc/s6.d; do
|
echo "Updating permissions..."
|
||||||
|
for dir in /nextcloud/config /data /config /apps2 /etc/nginx /etc/php7 /var/log /var/lib/nginx /var/lib/redis /tmp /etc/s6.d; do
|
||||||
if $(find $dir ! -user $UID -o ! -group $GID|egrep '.' -q); then
|
if $(find $dir ! -user $UID -o ! -group $GID|egrep '.' -q); then
|
||||||
|
echo "Updating permissions in $dir..."
|
||||||
chown -R $UID:$GID $dir
|
chown -R $UID:$GID $dir
|
||||||
|
else
|
||||||
|
echo "Permissions in $dir are correct."
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
echo "Done updating permissions."
|
||||||
|
|
||||||
if [ ! -f /config/config.php ]; then
|
if [ ! -f /config/config.php ]; then
|
||||||
# New installation, run the setup
|
# New installation, run the setup
|
||||||
|
@ -11,7 +11,7 @@ ln -sf /config/config.php /nextcloud/config/config.php &>/dev/null
|
|||||||
ln -sf /apps2 /nextcloud &>/dev/null
|
ln -sf /apps2 /nextcloud &>/dev/null
|
||||||
|
|
||||||
echo "Updating permissions..."
|
echo "Updating permissions..."
|
||||||
for dir in /nextcloud /data /config /apps2 /etc/nginx /etc/php7 /var/log /var/lib/nginx /var/lib/redis /tmp /etc/s6.d; do
|
for dir in /nextcloud/config /data /config /apps2 /etc/nginx /etc/php7 /var/log /var/lib/nginx /var/lib/redis /tmp /etc/s6.d; do
|
||||||
if $(find $dir ! -user $UID -o ! -group $GID|egrep '.' -q); then
|
if $(find $dir ! -user $UID -o ! -group $GID|egrep '.' -q); then
|
||||||
echo "Updating permissions in $dir..."
|
echo "Updating permissions in $dir..."
|
||||||
chown -R $UID:$GID $dir
|
chown -R $UID:$GID $dir
|
||||||
|
Loading…
x
Reference in New Issue
Block a user