diff --git a/Dockerfile b/Dockerfile index a06bbb5c71cf8f6594726432f98f92e9583524ae..1f712f1b5ac5eedb87414473d244ab5e297087be 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,54 +1,56 @@ FROM ubuntu:18.04 -RUN apt-get update && apt-get install -y --no-install-recommends \ - python \ - python2.7 \ - libpython2.7 \ - python-setuptools \ - python-ldap \ - python-urllib3 \ - python-pip \ - python-memcache \ - python-requests \ - ffmpeg \ - libmemcached-dev \ - build-essential \ - python-dev \ - zlib1g-dev \ +RUN apt-get update && \ + apt-get install -y --no-install-recommends \ + python3 \ + python3-pip \ + python3-setuptools \ wget -RUN pip2 install --upgrade pip -RUN pip2 install --upgrade wheel -RUN pip2 install --upgrade \ - pillow==4.3.0 \ - numpy==1.16.4 \ - moviepy==0.2.3.5 \ - psycopg2-binary \ - pylibmc \ - django-pylibmc + +RUN python3.6 -m pip install --upgrade pip && rm -r /root/.cache/pip + +RUN pip3 install \ + click \ + termcolor \ + colorlog \ + psycopg2-binary \ + django==1.11.29 Pillow \ + pylibmc \ + captcha \ + jinja2 \ + sqlalchemy \ + psd-tools \ + django-pylibmc \ + django-simple-captcha \ + python3-ldap \ + && rm -r /root/.cache/pip # add entrypoints ADD src/setenv.sh / ADD src/docker-entrypoint.sh / # set environment variables for locale -ENV LANG=C.UTF-8 -ENV LANGUAGE=C.UTF-8 -ENV LC_ALL=C.UTF-8 +ARG LANG=C.UTF-8 +ARG LANGUAGE=C.UTF-8 +ARG LC_ALL=C.UTF-8 # set environment variables for seafile -ENV ROOTPATH=/haiwen -ENV INSTALLPATH=$ROOTPATH/seafile-server-latest +ARG ROOTPATH=/haiwen +ARG INSTALLPATH=$ROOTPATH/seafile-server-latest + ENV CCNET_CONF_DIR=$ROOTPATH/ccnet ENV SEAFILE_CENTRAL_CONF_DIR=$ROOTPATH/conf ENV SEAFILE_CONF_DIR=$ROOTPATH/seafile-data +ENV GC_AT_STARTUP=false + # setup user environment RUN addgroup --gid 1000 seafile && \ adduser --gid 1000 --uid 1000 --system --shell /bin/bash --home $ROOTPATH seafile USER seafile VOLUME $SEAFILE_CONF_DIR -RUN wget https://download.seadrive.org/seafile-server_7.0.5_x86-64.tar.gz -O /tmp/seafile-server.tar.gz && \ +RUN wget https://download.seadrive.org/seafile-server_7.1.3_x86-64.tar.gz -O /tmp/seafile-server.tar.gz && \ tar -C /tmp/ -xzvf /tmp/seafile-server.tar.gz && \ rm /tmp/seafile-server.tar.gz && \ mv /tmp/seafile-server-* $INSTALLPATH diff --git a/src/docker-entrypoint.sh b/src/docker-entrypoint.sh index e1eecfa2de352350747f2e00a296456c513c1126..c6e4a3eb18cb79ba57e0f66fc95f5b276f32ceb9 100755 --- a/src/docker-entrypoint.sh +++ b/src/docker-entrypoint.sh @@ -1,6 +1,10 @@ #!/bin/bash source setenv.sh +if [[ "$GC_ON_STARTUP" = "true" ]]; then + $INSTALLPATH/seaf-gc.sh +fi + $INSTALLPATH/seafile.sh start $INSTALLPATH/seahub.sh start