Raspberry docker swarm from 7.1.5 to 8.0.3 (problem)

Hi everyone,

I’m trying to migrate from my docker swarm seafile 7.1.5 to 8.0.3 but I’m having some kind of problem with seahub. I suppose it is related with my Dockerfile but who knows. Any help.

Dockerfile for 7.1.5:

Dockerfile for 8.0.3:

FROM phusion/baseimage:master-arm

RUN apt-get update --fix-missing

# Utility tools
RUN apt-get install -y vim htop net-tools psmisc wget curl git

# For suport set local time zone.
RUN export DEBIAN_FRONTEND=noninteractive && apt-get install tzdata -y

# Nginx
RUN apt-get install -y \
nginx \
libjpeg-dev \
zlib1g-dev \
libtiff5-dev \
libfreetype6-dev \
libwebp-dev \
python3 \
python3-pip \
libmemcached-dev \
python3-setuptools

RUN python3.6 -m pip install --user --upgrade pip setuptools wheel  && rm -r /root/.cache/pip

RUN python3.6 -m pip install --timeout=3600 \
click \
termcolor \
colorlog \
pymysql \
Django==2.2.14 \
future \
captcha \
jinja2 \
django-statici18n \
django-post_office==3.3.0 \
django-webpack_loader \
gunicorn \
pymysql \
django-picklefield==2.1.1 \
openpyxl \
qrcode \
django-formtools \
django-simple-captcha \
djangorestframework==3.11.1 \
python-dateutil \
requests \
pillow \
pyjwt \
pycryptodome \
requests_oauthlib && \
rm -r /root/.cache/pip

# Scripts
COPY scripts_7.1 /scripts
COPY templates /templates
COPY services /services
RUN chmod u+x /scripts/*

RUN mkdir -p /etc/my_init.d && \
rm -f /etc/my_init.d/* && \
cp /scripts/create_data_links.sh /etc/my_init.d/01_create_data_links.sh

RUN mkdir -p /etc/service/nginx && \
rm -f /etc/nginx/sites-enabled/* /etc/nginx/conf.d/* && \
mv /services/nginx.conf /etc/nginx/nginx.conf && \
mv /services/nginx.sh /etc/service/nginx/run


# Seafile
WORKDIR /opt/seafile

ENV SEAFILE_VERSION=8.0.3 SEAFILE_SERVER=seafile-server
RUN mkdir -p /opt/seafile/ && cd /opt/seafile/ && \
wget https://github.com/haiwen/seafile-rpi/releases/download/v${SEAFILE_VERSION}/seafile-server-${SEAFILE_VERSION}-bionic-armv7.tar.gz && \
tar -zxvf seafile-server-${SEAFILE_VERSION}-bionic-armv7.tar.gz && \
rm -f seafile-server-${SEAFILE_VERSION}-bionic-armv7.tar.gz


# For using TLS connection to LDAP/AD server with docker-ce.
RUN find /opt/seafile/ \( -name "liblber-*" -o -name "libldap-*" -o -name "libldap_r*" -o -name "libsasl2.so*" \) -delete


EXPOSE 80


#CMD ["tail", "-f", "/dev/null" ]
CMD ["/sbin/my_init", "--", "/scripts/start.py"]

Only get into this if you have any experience generating seafile docker image as I’m using a modified version of the original https://github.com/haiwen/seafile-docker way of genarating the image.

( make server-rpi but modifing some paths and versions to hit 8.0.3 seafile version )

take into account that also avoiding an upgrade and creating an stack from scratch does not solve the problem.

stack file for 7.1.5:

version: '3.0'
services:
  db:
    image: biarms/mysql:5.7.33-beta-circleci
    environment:
      - PUID=1000
      - PGID=1000
      - MYSQL_ROOT_PASSWORD=db_dev  # Requested, set the root's password of MySQL service.
      - MYSQL_LOG_CONSOLE=true
    volumes:
      - /mnt/DISK/seafiles-mysql/db:/var/lib/mysql  # Requested, specifies the path to MySQL data persistent store.
    networks:
      - seafile-net
    deploy:
      placement:
        constraints:
          - "node.hostname==rpi"  #force to particular rpi node
      resources:
        limits:
          memory: 500M

  memcached:
    image: memcached:1.5.6
    entrypoint: memcached -m 256
    networks:
      - seafile-net
    deploy:
      placement:
        constraints:
          - "node.hostname==rpi"  #force to particular rpi node
      resources:
        limits:
          memory: 100M

  seafile:
    image: seafileltd/seafile-mc:7.1.5-rpi
    ports:
      - "80:80"
      - "443:443"  # If https is enabled, cancel the comment.
    volumes:
      - /mnt/DISK/seafiles:/shared   # Requested, specifies the path to Seafile data persistent store.
    environment:
      - DB_HOST=db
      - DB_USER_HOST=db
      - DB_ROOT_PASSWD=db_dev  # Requested, the value shuold be root's password of MySQL service.
      - TIME_ZONE=Etc/UTC  # Optional, default is UTC. Should be uncomment and set to your local time zone.
      - SEAFILE_SERVER_HOSTNAME=xxxxxxxx.duckdns.org # Specifies your host name if https is enabled.
      - SEAFILE_ADMIN_EMAIL=xxxxxxxx@gmail.com # Specifies Seafile admin user, default is 'me@example.com'.
      - SEAFILE_ADMIN_PASSWORD=xxxxxxxx     # Specifies Seafile admin password, default is 'asecret'.
      - SEAFILE_SERVER_LETSENCRYPT=true   # Whether to use https or not.
    networks:
      - seafile-net
    deploy:
      placement:
        constraints:
          - "node.hostname==rpi"  #force to particular rpi node
      resources:
        limits:
          memory: 500M

networks:
  seafile-net:

Stack for 8.0.3:

version: '3.0'
services:
  db:
    image: biarms/mysql:5.7.33-beta-circleci
    environment:
      - PUID=1000
      - PGID=1000
      - MYSQL_ROOT_PASSWORD=db_dev  # Requested, set the root's password of MySQL service.
      - MYSQL_LOG_CONSOLE=true
    volumes:
      - /mnt/DISK/seafiles-mysql/db:/var/lib/mysql  # Requested, specifies the path to MySQL data persistent store.
    networks:
      - seafile-net
    deploy:
      placement:
        constraints:
          - "node.hostname==rpi"  #force to particular rpi node
      resources:
        limits:
          memory: 500M

  memcached:
    image: memcached:1.5.6
    entrypoint: memcached -m 256
    networks:
      - seafile-net
    deploy:
      placement:
        constraints:
          - "node.hostname==rpi"  #force to particular rpi node
      resources:
        limits:
          memory: 100M

  seafile:
    image: seafileltd/seafile-mc:8.0.3-rpi
    ports:
      - "80:80"
      - "443:443"  # If https is enabled, cancel the comment.
    volumes:
      - /mnt/DISK/seafiles:/shared   # Requested, specifies the path to Seafile data persistent store.
    environment:
      - DB_HOST=db
      - DB_USER_HOST=db
      - DB_ROOT_PASSWD=db_dev  # Requested, the value shuold be root's password of MySQL service.
      - TIME_ZONE=Etc/UTC  # Optional, default is UTC. Should be uncomment and set to your local time zone.
      - SEAFILE_SERVER_HOSTNAME=xxxxxxxx.duckdns.org # Specifies your host name if https is enabled.
      - SEAFILE_ADMIN_EMAIL=xxxxxxxx@gmail.com # Specifies Seafile admin user, default is 'me@example.com'.
      - SEAFILE_ADMIN_PASSWORD=xxxxxxxx     # Specifies Seafile admin password, default is 'asecret'.
      - SEAFILE_SERVER_LETSENCRYPT=true   # Whether to use https or not.
    networks:
      - seafile-net
    deploy:
      placement:
        constraints:
          - "node.hostname==rpi"  #force to particular rpi node
      resources:
        limits:
          memory: 500M

networks:
  seafile-net:

take into account that some values have been replaced by xxxxx, also there are local DISK path references so these stack files will not work for you without some modifications.

I have found the problems in my Dockerfile. The package list to install was incomplete here are the ones that worked for me:

RUN apt-get install -y \
    nginx \
    libjpeg-dev \
    zlib1g-dev \
    libtiff5-dev \
    libfreetype6-dev \
    libwebp-dev \
    python3 \
    python3-pip \
    libmemcached-dev \
    libmariadbclient18 \
    python3-setuptools

RUN python3.6 -m pip install --user --upgrade pip setuptools wheel  && rm -r /root/.cache/pip

RUN python3.6 -m pip install --timeout=3600 \
    click \
    termcolor \
    colorlog \
    pymysql \
    Django==2.2.17 \
    future \
    pylibmc \
    captcha \
    jinja2 \
    django-statici18n \
    django-post_office~=3.3.0 \
    django-webpack_loader \
    django-pylibmc \
    gunicorn \
    pymysql \
    django-picklefield~=2.1.1 \
    openpyxl \
    qrcode \
    django-formtools \
    django-simple-captcha \
    djangorestframework~=3.12.2 \
    python-dateutil \
    requests \
    pillow \
    pyjwt~=1.7.1 \
    pycryptodome \
    requests_oauthlib && \
    rm -r /root/.cache/pip