Migrating dockerized NC30 from x86_64 to ARM64

Morning all!

I’m currently running NC30 on my 15+ years old Xeon with spinning disks. It’s running on docker with nginx. I have moved the system around a lot in the last many years - from VM to docker and such, but always inside x86_64.

I build my own image like this:

FROM nextcloud:30-fpm

RUN set -ex; \
    apt-get update; \
    apt-get install -y --no-install-recommends \
        ffmpeg \
        libmagickcore-6.q16-6-extra \
        ghostscript \
        procps \
        smbclient \
        supervisor \
#       libreoffice \
    ; \
    rm -rf /var/lib/apt/lists/*

#RUN set -ex; \
#    savedAptMark="$(apt-mark showmanual)"; \

RUN set -ex; \
    apt-get update; \
    apt-get install -y --no-install-recommends \
        libbz2-dev \
        libc-client-dev \
        libkrb5-dev \
        libsmbclient-dev

RUN set -ex; \
    docker-php-ext-configure imap --with-kerberos --with-imap-ssl; \
    docker-php-ext-install \
        bz2 \
        imap

RUN set -ex; \
    pecl install smbclient; \
    docker-php-ext-enable smbclient;

# RUN set -ex; \
#    reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
#    apt-mark auto '.*' > /dev/null; \
#    apt-mark manual $savedAptMark; \
#    ldd "$(php -r 'echo ini_get("extension_dir");')"/*.so \
#        | awk '/=>/ { print $3 }' \
#        | sort -u \
#        | xargs -r dpkg-query -S \
#        | cut -d: -f1 \
#        | sort -u \
#        | xargs -rt apt-mark manual; 
#

#RUN set -ex; \
#    apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
#    rm -rf /var/lib/apt/lists/*

RUN mkdir -p \
    /var/log/supervisord \
    /var/run/supervisord

COPY supervisord.conf /

run sed -i 's/\(^ *<policy.*rights="\)\([^"]*\)\(".*PDF.*\/>\)/\1read|write\3/1' /etc/ImageMagick-6/policy.xml

ENV NEXTCLOUD_UPDATE=1

CMD ["/usr/bin/supervisord", "-c", "/supervisord.conf"]

I also recently bought a FriendlyElec CM3588 NAS system with a few NVME SSDs and I am contemplating moving my NC to that. In principle that looks straightforward enough but I seem to remember that NC at some point started to include some binaries. Something about some Rust stuff. Are those available 1:1 in the ARM64 containers?

Can I just move all volumes from the Xeon to the CM3588 and up my compose stack or are there any architecture-specific things I need to watch out for?

1 Like

Yes, essentially.

The only thing you might encounter is that a couple of optional apps (Built in CODE comes to mind) have x86 specific app variants in the app store. It’s fairly rare though. The rust situation you may be referring to is probably notify_push. If you’re using it, should be fine since the app bundles binaries for all supported architectures.

1 Like

Thanks! CODE I actually run as a separate container and I might drop it completely because I rarely use it…

Is there an overview anywhere over apps which include binary files?

In theory apps declare it as a dependency so it’ll be in their app store entries (the raw file, not the web UI unfortunately), but nothing formally (behind using grep or similar) that I’m aware of.

There are probably only a handful:

  • richdocumentscode
  • memories
  • notify_push
  • possibly/probably some of the ML/AI apps (on my phone so can’t easily check at the moment)

Really shouldn’t be a huge deal. Just reinstall them after the transition.