Create the .seafile directory at moment of build

This commit is contained in:
flow.gunso
2020-01-06 18:25:53 +01:00
parent 8b00ea6bcb
commit eb5c9a1650
2 changed files with 3 additions and 4 deletions

View File

@@ -60,7 +60,9 @@ RUN apt-get update && apt-get install -y gnupg && \
/import-seafile-apt-key.sh && \ /import-seafile-apt-key.sh && \
mkdir /volume/ && \ mkdir /volume/ && \
groupadd -g $GID -o $UNAME && \ groupadd -g $GID -o $UNAME && \
useradd -m -u $UID -g $GID -o -s /bin/bash $UNAME useradd -m -u $UID -g $GID -o -s /bin/bash $UNAME && \
mkdir /home/$UNAME/.seafile && \
chown $UNAME:$GID /home/$UNAME/.seafile
# Copy over the entrypoints, healthchecks and tests. # Copy over the entrypoints, healthchecks and tests.
COPY docker-entrypoint.sh /entrypoint.sh COPY docker-entrypoint.sh /entrypoint.sh

View File

@@ -20,9 +20,6 @@
seafile_ini=~/.ccnet/seafile.ini seafile_ini=~/.ccnet/seafile.ini
seafile_sock=~/.seafile/seafile-data/seafile.sock seafile_sock=~/.seafile/seafile-data/seafile.sock
# Prepare the directories.
mkdir ~/.seafile
# Safely initialise the Seafile client. # Safely initialise the Seafile client.
/usr/bin/seaf-cli init -d ~/.seafile /usr/bin/seaf-cli init -d ~/.seafile
while [ ! -f $seafile_ini ]; do sleep 1; done while [ ! -f $seafile_ini ]; do sleep 1; done