crazy-max/docker-nextcloud

All 3 of the latest images are unusable

Blazin64 opened this issue · 4 comments

Behaviour

The latest 17.0.1, 16.0.6, and 15.0.13 images are unusable.

Steps to reproduce this issue

  1. Start with a working installation using the 16.0.4 image (Note that I used bind volumes)
  2. Stop the Docker compose docker-compose down
  3. Pull the latest 17.0.1 image docker-compose pull
  4. Start the Docker compose docker-compose up

Alternatively,
(The logs I provided are from this scenario using 17.0.1. The result is the same for all 3 images.)

  1. Start with a blank installation using the 17.0.1, 16.0.6, or 15.0.13 images. (Make sure to create the db and nextcloud directories in the same location as docker-compose.yml)
  2. Start the Docker compose docker-compose up

In either scenario, the container fails.

Expected behaviour

Nextcloud should be reachable in a web browser and the container based on the latest Nextcloud image should not constantly restart itself.

Actual behaviour

The container constantly restarts itself and only serves a 404 error page.

The heart of the problem appears to be

nextcloud  | chown: /var/run/nginx: No such file or directory
nextcloud  | chown: /var/run/php-fpm: No such file or directory
nextcloud_cron | chown: /var/run/nginx: No such file or directory
nextcloud_cron | chown: /var/run/php-fpm: No such file or directory

Configuration

  • Docker version (type docker --version) : 7f2769b/1.13.1
  • Docker compose version if applicable (type docker-compose --version) : 1.23.2, build 1110ad0
  • Platform (Debian 9, Ubuntu 18.04, ...) : CentOS 7
  • Include all necessary configuration files : docker-compose.yml, .env, ...

docker-compose.yml

version: "3.2"

services:
  traefik:
    image: traefik:alpine
    container_name: traefik
    command: --docker
    ports:
      - target: 80
        published: 80
        protocol: tcp
      - target: 443
        published: 443
        protocol: tcp
    volumes:
      - "./acme.json:/acme.json"
      - "./traefik.toml:/traefik.toml"
      - "/var/run/docker.sock:/var/run/docker.sock"
    restart: always

  db:
    image: yobasystems/alpine-mariadb
    container_name: nextcloud_db
    volumes:
      - type: bind
        source: ./db
        target: /var/lib/mysql
    env_file:
      - "./db.env"
    restart: always

  redis:
    image: redis:alpine
    container_name: nextcloud_redis
    restart: always

  nextcloud:
    image: crazymax/nextcloud:latest
    container_name: nextcloud
    depends_on:
      - db
      - redis
    volumes:
      - type: bind
        source: ./nextcloud
        target: /data
    labels:
      - "traefik.enable=true"
      - "traefik.backend=nextcloud"
      - "traefik.port=8000"
      - "traefik.frontend.rule=Host:nextcloud.example.com"
      - "traefik.frontend.redirect.permanent=true"
      - "traefik.frontend.redirect.regex=https://(.*)/.well-known/(card|cal)dav"
      - "traefik.frontend.redirect.replacement=https://$$1/remote.php/dav/"
    env_file:
      - "./nextcloud.env"
    restart: always

  cron:
    image: crazymax/nextcloud:latest
    container_name: nextcloud_cron
    depends_on:
      - nextcloud
    volumes:
      - type: bind
        source: ./nextcloud
        target: /data
    env_file:
      - "./nextcloud.env"
    environment:
      - "SIDECAR_CRON=1"
      - "CRON_PERIOD=*/15 * * * *"
    restart: always

traefik.toml

# defaultEntryPoints must be at the top
# because it should not be in any table below

defaultEntryPoints = ["http", "https"]

# Entrypoints, http and https
[entryPoints]
  # http should be redirected to https
  [entryPoints.http]
  address = ":80"

  [entryPoints.http.redirect]
  entryPoint = "https"

  # https is the default
  [entryPoints.https]
  address = ":443"

  [entryPoints.https.tls]

 [acme]
   email = "email@example.com"
   storage = "/acme.json"
   entryPoint = "https"
   onHostRule = true
   [acme.httpChallenge]
     entryPoint = "http"
   [[acme.domains]]
     main = "example.com"
     sans = ["nextcloud.example.com"]

[api]
  dashboard = true
  entryPoint = "traefik"

[docker]
endpoint = "unix:///var/run/docker.sock"
domain = "example.com"
watch = true
exposedbydefault = false

db.env

MYSQL_ALLOW_EMPTY_PASSWORD=yes
MYSQL_DATABASE=nextcloud
MYSQL_USER=nextcloud
MYSQL_PASSWORD=asupersecretpassword

nextcloud.env

TZ=America/Chicago

MEMORY_LIMIT=512M
UPLOAD_MAX_SIZE=512M
OPCACHE_MEM_SIZE=128
APC_SHM_SIZE=128M

HSTS_HEADER=max-age=15768000; includeSubDomains
RP_HEADER=strict-origin
SUBDIR=

DB_TYPE=mysql
DB_HOST=db
DB_NAME=nextcloud
DB_USER=nextcloud
DB_PASSWORD=asupersecretpassword

Docker info

Containers: 7
 Running: 5
 Paused: 0
 Stopped: 2
Images: 7
Server Version: 1.13.1
Storage Driver: overlay2
 Backing Filesystem: xfs
 Supports d_type: false
 Native Overlay Diff: true
Logging Driver: journald
Cgroup Driver: systemd
Plugins: 
 Volume: local
 Network: bridge host macvlan null overlay
Swarm: inactive
Runtimes: docker-runc runc
Default Runtime: docker-runc
Init Binary: /usr/libexec/docker/docker-init-current
containerd version:  (expected: aa8187dbd3b7ad67d8e5e3a15115d3eef43a7ed1)
runc version: 9c3c5f853ebf0ffac0d087e94daef462133b69c7 (expected: 9df8b306d01f59d3a8029be411de015b7304dd8f)
init version: fec3683b971d9c3ef73f284f176672c44b448662 (expected: 949e6facb77383876aeff8a6944dde66b3089574)
Security Options:
 seccomp
  WARNING: You're not using the default seccomp profile
  Profile: /etc/docker/seccomp.json
Kernel Version: 3.10.0-1062.1.2.el7.x86_64
Operating System: CentOS Linux 7 (Core)
OSType: linux
Architecture: x86_64
Number of Docker Hooks: 3
CPUs: 1
Total Memory: 991 MiB
Name: centos-1cpu-1gb-us-chi1
ID: HYSW:NYZ5:DM7S:LXCM:UUQI:S4XT:T5QJ:HLG4:2ENC:3ZWL:4CSG:LQVR
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
WARNING: bridge-nf-call-iptables is disabled
WARNING: bridge-nf-call-ip6tables is disabled
Experimental: false
Insecure Registries:
 127.0.0.0/8
Live Restore Enabled: false
Registries: docker.io (secure)

Logs

Attaching to traefik, nextcloud_db, nextcloud_redis, nextcloud, nextcloud_cron
nextcloud_db | [i] mysqld not found, creating....
nextcloud_db | [i] MySQL data directory not found, creating initial DBs
nextcloud_redis | 1:C 09 Dec 2019 20:24:08.580 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
nextcloud_redis | 1:C 09 Dec 2019 20:24:08.580 # Redis version=5.0.7, bits=64, commit=00000000, modified=0, pid=1, just started
nextcloud_redis | 1:C 09 Dec 2019 20:24:08.580 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
nextcloud_redis | 1:M 09 Dec 2019 20:24:08.581 * Running mode=standalone, port=6379.
nextcloud_redis | 1:M 09 Dec 2019 20:24:08.581 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
nextcloud_redis | 1:M 09 Dec 2019 20:24:08.581 # Server initialized
nextcloud_redis | 1:M 09 Dec 2019 20:24:08.581 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
nextcloud_redis | 1:M 09 Dec 2019 20:24:08.581 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.
nextcloud_redis | 1:M 09 Dec 2019 20:24:08.592 * DB loaded from disk: 0.011 seconds
nextcloud_redis | 1:M 09 Dec 2019 20:24:08.592 * Ready to accept connections
nextcloud    | [s6-init] making user provided files available at /var/run/s6/etc...exited 0.
nextcloud    | [s6-init] ensuring user provided files have correct perms...exited 0.
nextcloud    | [fix-attrs.d] applying ownership & permissions fixes...
nextcloud    | [fix-attrs.d] done.
nextcloud    | [cont-init.d] executing container initialization scripts...
nextcloud    | [cont-init.d] 00-fix-logs.sh: executing... 
nextcloud    | [cont-init.d] 00-fix-logs.sh: exited 0.
nextcloud    | [cont-init.d] 01-fix-uidgid.sh: executing... 
nextcloud    | [cont-init.d] 01-fix-uidgid.sh: exited 0.
nextcloud    | [cont-init.d] 02-fix-perms.sh: executing... 
nextcloud    | Fixing perms...
nextcloud    | chown: /var/run/nginx: No such file or directory
nextcloud    | chown: /var/run/php-fpm: No such file or directory
nextcloud    | [cont-init.d] 02-fix-perms.sh: exited 1.
nextcloud    | [cont-finish.d] executing container finish scripts...
nextcloud    | [cont-finish.d] done.
nextcloud    | [s6-finish] waiting for services.
nextcloud    | [s6-finish] sending all processes the TERM signal.
nextcloud_cron | [s6-init] making user provided files available at /var/run/s6/etc...exited 0.
nextcloud_cron | [s6-init] ensuring user provided files have correct perms...exited 0.
nextcloud_cron | [fix-attrs.d] applying ownership & permissions fixes...
nextcloud_cron | [fix-attrs.d] done.
nextcloud_cron | [cont-init.d] executing container initialization scripts...
nextcloud_cron | [cont-init.d] 00-fix-logs.sh: executing... 
nextcloud_cron | [cont-init.d] 00-fix-logs.sh: exited 0.
nextcloud_cron | [cont-init.d] 01-fix-uidgid.sh: executing... 
nextcloud_cron | [cont-init.d] 01-fix-uidgid.sh: exited 0.
nextcloud_cron | [cont-init.d] 02-fix-perms.sh: executing... 
nextcloud_cron | Fixing perms...
nextcloud_cron | chown: /var/run/nginx: No such file or directory
nextcloud_cron | chown: /var/run/php-fpm: No such file or directory
nextcloud_cron | [cont-init.d] 02-fix-perms.sh: exited 1.
nextcloud_cron | [cont-finish.d] executing container finish scripts...
nextcloud_cron | [cont-finish.d] done.
nextcloud_cron | [s6-finish] waiting for services.
nextcloud_cron | [s6-finish] sending all processes the TERM signal.
nextcloud_db | [i] MySQL root Password: phupieJ7zohsuGeb
nextcloud_db | [i] Creating database: nextcloud
nextcloud_db | [i] with character set: 'utf8' and collation: 'utf8_general_ci'
nextcloud_db | [i] Creating user: nextcloud with password asupersecretpassword
nextcloud_db | 2019-12-09 20:24:11 0 [Note] /usr/bin/mysqld (mysqld 10.3.17-MariaDB) starting as process 68 ...
nextcloud_db | 2019-12-09 20:24:11 0 [Note] InnoDB: Using Linux native AIO
nextcloud_db | 2019-12-09 20:24:11 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
nextcloud_db | 2019-12-09 20:24:11 0 [Note] InnoDB: Uses event mutexes
nextcloud_db | 2019-12-09 20:24:11 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
nextcloud_db | 2019-12-09 20:24:11 0 [Note] InnoDB: Number of pools: 1
nextcloud_db | 2019-12-09 20:24:11 0 [Note] InnoDB: Using SSE2 crc32 instructions
nextcloud_db | 2019-12-09 20:24:11 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
nextcloud_db | 2019-12-09 20:24:11 0 [Note] InnoDB: Completed initialization of buffer pool
nextcloud_db | 2019-12-09 20:24:11 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
nextcloud_db | 2019-12-09 20:24:12 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
nextcloud_db | 2019-12-09 20:24:12 0 [Note] InnoDB: Creating shared tablespace for temporary tables
nextcloud_db | 2019-12-09 20:24:12 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
nextcloud_db | 2019-12-09 20:24:12 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
nextcloud_db | 2019-12-09 20:24:12 0 [Note] InnoDB: Waiting for purge to start
nextcloud_db | 2019-12-09 20:24:12 0 [Note] InnoDB: 10.3.17 started; log sequence number 1630815; transaction id 21
nextcloud_db | 2019-12-09 20:24:12 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
nextcloud_db | 2019-12-09 20:24:12 0 [Note] InnoDB: Buffer pool(s) load completed at 191209 20:24:12
nextcloud_db | 2019-12-09 20:24:12 0 [Note] Plugin 'FEEDBACK' is disabled.
nextcloud_db | 2019-12-09 20:24:12 6 [Warning] 'user' entry 'root@51f572817815' ignored in --skip-name-resolve mode.
nextcloud_db | 2019-12-09 20:24:12 6 [Warning] 'user' entry '@51f572817815' ignored in --skip-name-resolve mode.
nextcloud_db | 2019-12-09 20:24:12 6 [Warning] 'proxies_priv' entry '@% root@51f572817815' ignored in --skip-name-resolve mode.
nextcloud_db | 2019-12-09 20:24:12 6 [Warning] 'user' entry 'root@51f572817815' ignored in --skip-name-resolve mode.
nextcloud_db | 2019-12-09 20:24:12 6 [Warning] 'user' entry '@51f572817815' ignored in --skip-name-resolve mode.
nextcloud_db | 2019-12-09 20:24:12 6 [Warning] 'proxies_priv' entry '@% root@51f572817815' ignored in --skip-name-resolve mode.
nextcloud    | [s6-finish] sending all processes the KILL signal and exiting.
nextcloud_cron | [s6-finish] sending all processes the KILL signal and exiting.
nextcloud    | [s6-init] making user provided files available at /var/run/s6/etc...exited 0.
nextcloud_db | /scripts/run.sh: ignoring or entrypoint initdb empty /docker-entrypoint-initdb.d/*
nextcloud_db | 
nextcloud_db | 
nextcloud_db | MySQL init process done. Ready for start up.
nextcloud_db | 
nextcloud_db | exec /usr/bin/mysqld --user=mysql --console --skip-name-resolve --skip-networking=0
nextcloud    | [s6-init] ensuring user provided files have correct perms...exited 0.
nextcloud    | [fix-attrs.d] applying ownership & permissions fixes...
nextcloud    | [fix-attrs.d] done.
nextcloud    | [cont-init.d] executing container initialization scripts...
nextcloud    | [cont-init.d] 00-fix-logs.sh: executing... 
nextcloud    | [cont-init.d] 00-fix-logs.sh: exited 0.
nextcloud    | [cont-init.d] 01-fix-uidgid.sh: executing... 
nextcloud    | [cont-init.d] 01-fix-uidgid.sh: exited 0.
nextcloud    | [cont-init.d] 02-fix-perms.sh: executing... 
nextcloud    | Fixing perms...
nextcloud_db | 2019-12-09 20:24:13 0 [Note] /usr/bin/mysqld (mysqld 10.3.17-MariaDB) starting as process 1 ...
nextcloud    | chown: /var/run/nginx: No such file or directory
nextcloud    | chown: /var/run/php-fpm: No such file or directory
nextcloud    | [cont-init.d] 02-fix-perms.sh: exited 1.
nextcloud    | [cont-finish.d] executing container finish scripts...
nextcloud    | [cont-finish.d] done.
nextcloud    | [s6-finish] waiting for services.
nextcloud_db | 2019-12-09 20:24:13 0 [Note] InnoDB: Using Linux native AIO
nextcloud_db | 2019-12-09 20:24:13 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
nextcloud_db | 2019-12-09 20:24:13 0 [Note] InnoDB: Uses event mutexes
nextcloud_db | 2019-12-09 20:24:13 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
nextcloud_db | 2019-12-09 20:24:13 0 [Note] InnoDB: Number of pools: 1
nextcloud_db | 2019-12-09 20:24:13 0 [Note] InnoDB: Using SSE2 crc32 instructions
nextcloud_db | 2019-12-09 20:24:13 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
nextcloud_db | 2019-12-09 20:24:14 0 [Note] InnoDB: Completed initialization of buffer pool
nextcloud_db | 2019-12-09 20:24:14 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
nextcloud_db | 2019-12-09 20:24:14 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
nextcloud_db | 2019-12-09 20:24:14 0 [Note] InnoDB: Creating shared tablespace for temporary tables
nextcloud_db | 2019-12-09 20:24:14 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
nextcloud_db | 2019-12-09 20:24:14 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
nextcloud_db | 2019-12-09 20:24:14 0 [Note] InnoDB: Waiting for purge to start
nextcloud_db | 2019-12-09 20:24:14 0 [Note] InnoDB: 10.3.17 started; log sequence number 1630824; transaction id 21
nextcloud_db | 2019-12-09 20:24:14 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
nextcloud_db | 2019-12-09 20:24:14 0 [Note] InnoDB: Buffer pool(s) load completed at 191209 20:24:14
nextcloud_db | 2019-12-09 20:24:14 0 [Note] Plugin 'FEEDBACK' is disabled.
nextcloud_db | 2019-12-09 20:24:14 0 [Note] Server socket created on IP: '::'.
nextcloud_db | 2019-12-09 20:24:14 0 [Warning] 'user' entry 'root@51f572817815' ignored in --skip-name-resolve mode.
nextcloud_db | 2019-12-09 20:24:14 0 [Warning] 'user' entry '@51f572817815' ignored in --skip-name-resolve mode.
nextcloud_db | 2019-12-09 20:24:14 0 [Warning] 'proxies_priv' entry '@% root@51f572817815' ignored in --skip-name-resolve mode.
nextcloud_db | 2019-12-09 20:24:14 0 [Note] Reading of all Master_info entries succeeded
nextcloud_db | 2019-12-09 20:24:14 0 [Note] Added new Master_info '' to hash table
nextcloud_db | 2019-12-09 20:24:14 0 [Note] /usr/bin/mysqld: ready for connections.
nextcloud_db | Version: '10.3.17-MariaDB'  socket: '/run/mysqld/mysqld.sock'  port: 3306  MariaDB Server
nextcloud    | [s6-finish] sending all processes the TERM signal.
nextcloud_cron | [s6-init] making user provided files available at /var/run/s6/etc...exited 0.
nextcloud_cron | [s6-init] ensuring user provided files have correct perms...exited 0.
nextcloud_cron | [fix-attrs.d] applying ownership & permissions fixes...
nextcloud_cron | [fix-attrs.d] done.
nextcloud_cron | [cont-init.d] executing container initialization scripts...
nextcloud_cron | [cont-init.d] 00-fix-logs.sh: executing... 
nextcloud_cron | [cont-init.d] 00-fix-logs.sh: exited 0.
nextcloud_cron | [cont-init.d] 01-fix-uidgid.sh: executing... 
nextcloud_cron | [cont-init.d] 01-fix-uidgid.sh: exited 0.
nextcloud_cron | [cont-init.d] 02-fix-perms.sh: executing... 
nextcloud_cron | Fixing perms...
nextcloud_cron | chown: /var/run/nginx: No such file or directory
nextcloud_cron | chown: /var/run/php-fpm: No such file or directory
nextcloud_cron | [cont-init.d] 02-fix-perms.sh: exited 1.
nextcloud_cron | [cont-finish.d] executing container finish scripts...
nextcloud_cron | [cont-finish.d] done.
nextcloud_cron | [s6-finish] waiting for services.
nextcloud_cron | [s6-finish] sending all processes the TERM signal.
nextcloud    | [s6-finish] sending all processes the KILL signal and exiting.
nextcloud exited with code 1
nextcloud_cron | [s6-finish] sending all processes the KILL signal and exiting.
nextcloud    | [s6-init] making user provided files available at /var/run/s6/etc...exited 0.
nextcloud_cron exited with code 1

@Blazin64

Cannot reproduce your issue using the traefik compose example with bind volumes.

cron_1          | [s6-init] making user provided files available at /var/run/s6/etc...exited 0.
cron_1          | [s6-init] ensuring user provided files have correct perms...exited 0.
cron_1          | [fix-attrs.d] applying ownership & permissions fixes...
cron_1          | [fix-attrs.d] done.
cron_1          | [cont-init.d] executing container initialization scripts...
cron_1          | [cont-init.d] 00-fix-logs.sh: executing...
cron_1          | [cont-init.d] 00-fix-logs.sh: exited 0.
cron_1          | [cont-init.d] 01-fix-uidgid.sh: executing...
cron_1          | [cont-init.d] 01-fix-uidgid.sh: exited 0.
cron_1          | [cont-init.d] 02-fix-perms.sh: executing...
cron_1          | Fixing perms...
cron_1          | [cont-init.d] 02-fix-perms.sh: exited 0.
cron_1          | [cont-init.d] 03-config.sh: executing...
cron_1          | Setting timezone to Europe/Paris...
cron_1          | Setting PHP-FPM configuration...
cron_1          | Setting PHP configuration...
cron_1          | sed: bad option in substitution expression
cron_1          | Setting Nginx configuration...
cron_1          | Initializing Nextcloud files/folders...
cron_1          | [cont-init.d] 03-config.sh: exited 0.
cron_1          | [cont-init.d] 04-svc-main.sh: executing...
cron_1          | [cont-init.d] 04-svc-main.sh: exited 0.
cron_1          | [cont-init.d] 05-svc-cron.sh: executing...
cron_1          | >>
cron_1          | >> Sidecar cron container detected for Nextcloud
cron_1          | >>
cron_1          | Creating Nextcloud cron task with the following period fields : * * * * *
cron_1          | Fixing crontabs permissions...
cron_1          | [cont-init.d] 05-svc-cron.sh: exited 0.
cron_1          | [cont-init.d] 06-svc-news-updater.sh: executing...
cron_1          | [cont-init.d] 06-svc-news-updater.sh: exited 0.
cron_1          | [cont-init.d] done.
cron_1          | [services.d] starting services
cron_1          | crond: crond (busybox 1.30.1) started, log level 8
cron_1          | [services.d] done.
cron_1          | crond: USER nextcloud pid 294 cmd php -f /var/www/cron.php
nextcloud_1     | [s6-init] making user provided files available at /var/run/s6/etc...exited 0.
nextcloud_1     | [s6-init] ensuring user provided files have correct perms...exited 0.
nextcloud_1     | [fix-attrs.d] applying ownership & permissions fixes...
nextcloud_1     | [fix-attrs.d] done.
nextcloud_1     | [cont-init.d] executing container initialization scripts...
nextcloud_1     | [cont-init.d] 00-fix-logs.sh: executing...
nextcloud_1     | [cont-init.d] 00-fix-logs.sh: exited 0.
nextcloud_1     | [cont-init.d] 01-fix-uidgid.sh: executing...
nextcloud_1     | [cont-init.d] 01-fix-uidgid.sh: exited 0.
nextcloud_1     | [cont-init.d] 02-fix-perms.sh: executing...
nextcloud_1     | Fixing perms...
nextcloud_1     | [cont-init.d] 02-fix-perms.sh: exited 0.
nextcloud_1     | [cont-init.d] 03-config.sh: executing...
nextcloud_1     | Setting timezone to Europe/Paris...
nextcloud_1     | Setting PHP-FPM configuration...
nextcloud_1     | Setting PHP configuration...
nextcloud_1     | sed: bad option in substitution expression
nextcloud_1     | Setting Nginx configuration...
nextcloud_1     | Initializing Nextcloud files/folders...
nextcloud_1     | [cont-init.d] 03-config.sh: exited 0.
nextcloud_1     | [cont-init.d] 04-svc-main.sh: executing...
nextcloud_1     | Bootstrapping configuration...
nextcloud_1     | The current PHP memory limit is below the recommended value of 512MB.
nextcloud_1     | [cont-init.d] 04-svc-main.sh: exited 0.
nextcloud_1     | [cont-init.d] 05-svc-cron.sh: executing...
nextcloud_1     | [cont-init.d] 05-svc-cron.sh: exited 0.
nextcloud_1     | [cont-init.d] 06-svc-news-updater.sh: executing...
nextcloud_1     | [cont-init.d] 06-svc-news-updater.sh: exited 0.
nextcloud_1     | [cont-init.d] done.
nextcloud_1     | [services.d] starting services
nextcloud_1     | [services.d] done.
nextcloud_1     | 2019/12/09 22:56:54 [notice] 293#293: using the "epoll" event method
nextcloud_1     | 2019/12/09 22:56:54 [notice] 293#293: nginx/1.16.1
nextcloud_1     | 2019/12/09 22:56:54 [notice] 293#293: OS: Linux 4.19.76-linuxkit
nextcloud_1     | 2019/12/09 22:56:54 [notice] 293#293: getrlimit(RLIMIT_NOFILE): 1048576:1048576
nextcloud_1     | 2019/12/09 22:56:54 [notice] 293#293: start worker processes
nextcloud_1     | 2019/12/09 22:56:54 [notice] 293#293: start worker process 309
nextcloud_1     | 2019/12/09 22:56:54 [notice] 293#293: start worker process 310
nextcloud_1     | [09-Dec-2019 22:56:54] NOTICE: fpm is running, pid 295
nextcloud_1     | [09-Dec-2019 22:56:54] NOTICE: ready to handle connections
nextcloud_1     | 172.18.0.1 - - [09/Dec/2019:22:57:25 +0100] "GET / HTTP/1.1" 200 2370 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:69.0) Gecko/20100101 Firefox/69.0"

The heart of the problem appears to be

nextcloud  | chown: /var/run/nginx: No such file or directory
nextcloud  | chown: /var/run/php-fpm: No such file or directory
nextcloud_cron | chown: /var/run/nginx: No such file or directory
nextcloud_cron | chown: /var/run/php-fpm: No such file or directory

That's strange, these folders are already created.

Start with a working installation using the 16.0.4 image (Note that I used bind volumes)

Many things have changed since 16.0.4, please see CHANGELOG for the latest changes.

I'm not sure it will help, but I just made another attempt with a blank installation.

I ran yum update and restarted my CentOS 7 server, to be sure things were as up to date as possible.

I switched to a nearly verbatim copy of your Traefik example instead of using my somewhat custom configuration. The only major difference from your example is that I removed Collabora.

I also ran these 3 commands below before starting the compose to be sure there were no leftovers from any previous attempts.

docker rm $(sudo docker ps -a -q)
docker rmi -f $(sudo docker images -q)
docker volume rm $(sudo docker volume ls -qf dangling=true)

After docker-compose up, I get the same problem as before. The errors in the logs repeat, since the containers restart over and over. The logs look largely the same as last time.

docker-compose.yml

version: "3.2"

services:
  traefik:
    image: traefik:1.7-alpine
    container_name: traefik
    command:
      - "--logLevel=INFO"
      - "--defaultentrypoints=http,https"
      - "--entryPoints=Name:http Address::80 Redirect.EntryPoint:https"
      - "--entryPoints=Name:https Address::443 TLS"
      - "--docker"
      - "--docker.exposedbydefault=false"
      - "--docker.domain=example.com"
      - "--acme=true"
      - "--acme.acmelogging=true"
      - "--acme.email=example@example.com"
      - "--acme.storage=/acme.json"
      - "--acme.entryPoint=https"
      - "--acme.onhostrule=true"
      - "--acme.httpchallenge=true"
      - "--acme.httpchallenge.entrypoint=http"
      - "--acme.domains=example.com,nextcloud.example.com"
    ports:
      - target: 80
        published: 80
        protocol: tcp
      - target: 443
        published: 443
        protocol: tcp
    volumes:
      - "./acme.json:/acme.json"
      - "/var/run/docker.sock:/var/run/docker.sock"
    restart: always

  db:
    image: mariadb:10.2
    container_name: nextcloud_db
    volumes:
      - "db:/var/lib/mysql"
    environment:
      - "MYSQL_ALLOW_EMPTY_PASSWORD=yes"
      - "MYSQL_DATABASE=nextcloud"
      - "MYSQL_USER=nextcloud"
      - "MYSQL_PASSWORD=asupersecretpassword"
    restart: always

  redis:
    image: redis:4.0-alpine
    container_name: nextcloud_redis
    restart: always

  nextcloud:
    image: crazymax/nextcloud:latest
    container_name: nextcloud
    depends_on:
      - db
      - redis
    volumes:
      - "nextcloud:/data"
    labels:
      - "traefik.enable=true"
      - "traefik.backend=nextcloud"
      - "traefik.port=8000"
      - "traefik.frontend.rule=Host:nextcloud.example.com"
      - "traefik.frontend.redirect.permanent=true"
      - "traefik.frontend.redirect.regex=https://(.*)/.well-known/(card|cal)dav"
      - "traefik.frontend.redirect.replacement=https://$$1/remote.php/dav/"
    env_file:
      - "./nextcloud.env"
    restart: always

  cron:
    image: crazymax/nextcloud:latest
    container_name: nextcloud_cron
    depends_on:
      - nextcloud
    volumes:
      - "nextcloud:/data"
    env_file:
      - "./nextcloud.env"
    environment:
      - "SIDECAR_CRON=1"
      - "CRON_PERIOD=*/15 * * * *"
    restart: always

  news_updater:
    image: crazymax/nextcloud:latest
    container_name: nextcloud_news_updater
    depends_on:
      - nextcloud
    volumes:
      - "nextcloud:/data"
    env_file:
      - "./nextcloud.env"
    environment:
      - "SIDECAR_NEWSUPDATER=1"
      - "NC_NEWSUPDATER_THREADS=10"
      - "NC_NEWSUPDATER_TIMEOUT=300"
      - "NC_NEWSUPDATER_INTERVAL=900"
      - "NC_NEWSUPDATER_LOGLEVEL=error"
    restart: always

volumes:
  db:
  nextcloud:

nextcloud.env

TZ=America/Chicago

PUID=1000
PGID=1000

MEMORY_LIMIT=512M
UPLOAD_MAX_SIZE=512M
OPCACHE_MEM_SIZE=128
APC_SHM_SIZE=128M
REAL_IP_FROM=0.0.0.0/32
REAL_IP_HEADER=X-Forwarded-For
LOG_IP_VAR=http_x_forwarded_for

HSTS_HEADER=max-age=15768000; includeSubDomains
RP_HEADER=strict-origin
SUBDIR=

DB_TYPE=mysql
DB_HOST=db
DB_NAME=nextcloud
DB_USER=nextcloud
DB_PASSWORD=asupersecretpassword

Logs

nextcloud_redis | 1:C 09 Dec 23:16:08.634 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
nextcloud_redis | 1:C 09 Dec 23:16:08.634 # Redis version=4.0.14, bits=64, commit=00000000, modified=0, pid=1, just started
nextcloud_redis | 1:C 09 Dec 23:16:08.634 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
nextcloud_redis | 1:M 09 Dec 23:16:08.636 * Running mode=standalone, port=6379.
nextcloud_redis | 1:M 09 Dec 23:16:08.636 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
nextcloud_redis | 1:M 09 Dec 23:16:08.636 # Server initialized
nextcloud_redis | 1:M 09 Dec 23:16:08.636 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
nextcloud_redis | 1:M 09 Dec 23:16:08.636 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.
nextcloud_redis | 1:M 09 Dec 23:16:08.636 * Ready to accept connections
nextcloud_db    | 2019-12-09 23:16:08+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 1:10.2.29+maria~bionic started.
nextcloud_db    | 2019-12-09 23:16:09+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
nextcloud_db    | 2019-12-09 23:16:09+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 1:10.2.29+maria~bionic started.
nextcloud_db    | 2019-12-09 23:16:10+00:00 [Note] [Entrypoint]: Initializing database files
nextcloud       | [s6-init] making user provided files available at /var/run/s6/etc...exited 0.
nextcloud       | [s6-init] ensuring user provided files have correct perms...exited 0.
nextcloud       | [fix-attrs.d] applying ownership & permissions fixes...
nextcloud       | [fix-attrs.d] done.
nextcloud       | [cont-init.d] executing container initialization scripts...
nextcloud       | [cont-init.d] 00-fix-logs.sh: executing... 
nextcloud       | [cont-init.d] 00-fix-logs.sh: exited 0.
nextcloud       | [cont-init.d] 01-fix-uidgid.sh: executing... 
nextcloud       | [cont-init.d] 01-fix-uidgid.sh: exited 0.
nextcloud       | [cont-init.d] 02-fix-perms.sh: executing... 
nextcloud       | Fixing perms...
nextcloud       | chown: /var/run/nginx: No such file or directory
nextcloud       | chown: /var/run/php-fpm: No such file or directory
nextcloud       | [cont-init.d] 02-fix-perms.sh: exited 1.
nextcloud       | [cont-finish.d] executing container finish scripts...
nextcloud       | [cont-finish.d] done.
nextcloud       | [s6-finish] waiting for services.
nextcloud       | [s6-finish] sending all processes the TERM signal.
nextcloud_cron  | [s6-init] making user provided files available at /var/run/s6/etc...exited 0.
nextcloud_news_updater | [s6-init] making user provided files available at /var/run/s6/etc...exited 0.
nextcloud_cron  | [s6-init] ensuring user provided files have correct perms...exited 0.
nextcloud_cron  | [fix-attrs.d] applying ownership & permissions fixes...
nextcloud_cron  | [fix-attrs.d] done.
nextcloud_cron  | [cont-init.d] executing container initialization scripts...
nextcloud_cron  | [cont-init.d] 00-fix-logs.sh: executing... 
nextcloud_cron  | [cont-init.d] 00-fix-logs.sh: exited 0.
nextcloud_cron  | [cont-init.d] 01-fix-uidgid.sh: executing... 
nextcloud_news_updater | [s6-init] ensuring user provided files have correct perms...exited 0.
nextcloud_cron  | [cont-init.d] 01-fix-uidgid.sh: exited 0.
nextcloud_cron  | [cont-init.d] 02-fix-perms.sh: executing... 
nextcloud_news_updater | [fix-attrs.d] applying ownership & permissions fixes...
nextcloud_cron  | Fixing perms...
nextcloud_news_updater | [fix-attrs.d] done.
nextcloud_news_updater | [cont-init.d] executing container initialization scripts...
nextcloud_news_updater | [cont-init.d] 00-fix-logs.sh: executing... 
nextcloud_news_updater | [cont-init.d] 00-fix-logs.sh: exited 0.
nextcloud_news_updater | [cont-init.d] 01-fix-uidgid.sh: executing... 
nextcloud_news_updater | [cont-init.d] 01-fix-uidgid.sh: exited 0.
nextcloud_news_updater | [cont-init.d] 02-fix-perms.sh: executing... 
nextcloud_cron  | chown: /var/run/nginx: No such file or directory
nextcloud_cron  | chown: /var/run/php-fpm: No such file or directory
nextcloud_cron  | [cont-init.d] 02-fix-perms.sh: exited 1.
nextcloud_news_updater | Fixing perms...
nextcloud_cron  | [cont-finish.d] executing container finish scripts...
nextcloud_cron  | [cont-finish.d] done.
nextcloud_cron  | [s6-finish] waiting for services.
nextcloud_news_updater | chown: /var/run/nginx: No such file or directory
nextcloud_news_updater | chown: /var/run/php-fpm: No such file or directory
nextcloud_news_updater | [cont-init.d] 02-fix-perms.sh: exited 1.
nextcloud_news_updater | [cont-finish.d] executing container finish scripts...
nextcloud_news_updater | [cont-finish.d] done.
nextcloud_news_updater | [s6-finish] waiting for services.
nextcloud_cron  | [s6-finish] sending all processes the TERM signal.
nextcloud_news_updater | [s6-finish] sending all processes the TERM signal.
nextcloud_db    | 
nextcloud_db    | 
nextcloud_db    | PLEASE REMEMBER TO SET A PASSWORD FOR THE MariaDB root USER !
nextcloud_db    | To do so, start the server, then issue the following commands:
nextcloud_db    | 
nextcloud_db    | '/usr/bin/mysqladmin' -u root password 'new-password'
nextcloud_db    | '/usr/bin/mysqladmin' -u root -h  password 'new-password'
nextcloud_db    | 
nextcloud_db    | Alternatively you can run:
nextcloud_db    | '/usr/bin/mysql_secure_installation'
nextcloud_db    | 
nextcloud_db    | which will also give you the option of removing the test
nextcloud_db    | databases and anonymous user created by default.  This is
nextcloud_db    | strongly recommended for production servers.
nextcloud_db    | 
nextcloud_db    | See the MariaDB Knowledgebase at http://mariadb.com/kb or the
nextcloud_db    | MySQL manual for more instructions.
nextcloud_db    | 
nextcloud_db    | Please report any problems at http://mariadb.org/jira
nextcloud_db    | 
nextcloud_db    | The latest information about MariaDB is available at http://mariadb.org/.
nextcloud_db    | You can find additional information about the MySQL part at:
nextcloud_db    | http://dev.mysql.com
nextcloud_db    | Consider joining MariaDB's strong and vibrant community:
nextcloud_db    | https://mariadb.org/get-involved/
nextcloud_db    | 
nextcloud_db    | 2019-12-09 23:16:12+00:00 [Note] [Entrypoint]: Database files initialized
nextcloud_db    | 2019-12-09 23:16:12+00:00 [Note] [Entrypoint]: Starting temporary server
nextcloud_db    | 2019-12-09 23:16:12+00:00 [Note] [Entrypoint]: Waiting for server startup
nextcloud_db    | 2019-12-09 23:16:12 140347001247040 [Note] mysqld (mysqld 10.2.29-MariaDB-1:10.2.29+maria~bionic) starting as process 118 ...
nextcloud_db    | 2019-12-09 23:16:12 140347001247040 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
nextcloud_db    | 2019-12-09 23:16:12 140347001247040 [Note] InnoDB: Uses event mutexes
nextcloud_db    | 2019-12-09 23:16:12 140347001247040 [Note] InnoDB: Compressed tables use zlib 1.2.11
nextcloud_db    | 2019-12-09 23:16:12 140347001247040 [Note] InnoDB: Using Linux native AIO
nextcloud_db    | 2019-12-09 23:16:12 140347001247040 [Note] InnoDB: Number of pools: 1
nextcloud_db    | 2019-12-09 23:16:12 140347001247040 [Note] InnoDB: Using SSE2 crc32 instructions
nextcloud_db    | 2019-12-09 23:16:12 140347001247040 [Note] InnoDB: Initializing buffer pool, total size = 256M, instances = 1, chunk size = 128M
nextcloud_db    | 2019-12-09 23:16:12 140347001247040 [Note] InnoDB: Completed initialization of buffer pool
nextcloud_db    | 2019-12-09 23:16:12 140346279679744 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
nextcloud_db    | 2019-12-09 23:16:12 140347001247040 [Note] InnoDB: Highest supported file format is Barracuda.
nextcloud_db    | 2019-12-09 23:16:12 140347001247040 [Note] InnoDB: 128 out of 128 rollback segments are active.
nextcloud_db    | 2019-12-09 23:16:12 140347001247040 [Note] InnoDB: Creating shared tablespace for temporary tables
nextcloud_db    | 2019-12-09 23:16:12 140347001247040 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
nextcloud_db    | 2019-12-09 23:16:12 140347001247040 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
nextcloud_db    | 2019-12-09 23:16:12 140347001247040 [Note] InnoDB: Waiting for purge to start
nextcloud_db    | 2019-12-09 23:16:12 140347001247040 [Note] InnoDB: 5.7.28 started; log sequence number 1619987
nextcloud_db    | 2019-12-09 23:16:12 140345773913856 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
nextcloud_db    | 2019-12-09 23:16:12 140347001247040 [Note] Plugin 'FEEDBACK' is disabled.
nextcloud_db    | 2019-12-09 23:16:12 140347001247040 [Warning] 'user' entry 'root@9f7cea7f6b77' ignored in --skip-name-resolve mode.
nextcloud_db    | 2019-12-09 23:16:12 140347001247040 [Warning] 'proxies_priv' entry '@% root@9f7cea7f6b77' ignored in --skip-name-resolve mode.
nextcloud_db    | 2019-12-09 23:16:12 140345773913856 [Note] InnoDB: Buffer pool(s) load completed at 191209 23:16:12
nextcloud_db    | 2019-12-09 23:16:12 140347001247040 [Note] Reading of all Master_info entries succeeded
nextcloud_db    | 2019-12-09 23:16:12 140347001247040 [Note] Added new Master_info '' to hash table
nextcloud_db    | 2019-12-09 23:16:12 140347001247040 [Note] mysqld: ready for connections.
nextcloud_db    | Version: '10.2.29-MariaDB-1:10.2.29+maria~bionic'  socket: '/var/run/mysqld/mysqld.sock'  port: 0  mariadb.org binary distribution
nextcloud       | [s6-finish] sending all processes the KILL signal and exiting.
nextcloud       | [s6-init] making user provided files available at /var/run/s6/etc...exited 0.
nextcloud       | [s6-init] ensuring user provided files have correct perms...exited 0.
nextcloud       | [fix-attrs.d] applying ownership & permissions fixes...
nextcloud       | [fix-attrs.d] done.
nextcloud       | [cont-init.d] executing container initialization scripts...
nextcloud       | [cont-init.d] 00-fix-logs.sh: executing... 
nextcloud       | [cont-init.d] 00-fix-logs.sh: exited 0.
nextcloud       | [cont-init.d] 01-fix-uidgid.sh: executing... 
nextcloud_db    | 2019-12-09 23:16:13+00:00 [Note] [Entrypoint]: Temporary server started.
nextcloud       | [cont-init.d] 01-fix-uidgid.sh: exited 0.
nextcloud       | [cont-init.d] 02-fix-perms.sh: executing... 
nextcloud       | Fixing perms...
nextcloud       | chown: /var/run/nginx: No such file or directory
nextcloud       | chown: /var/run/php-fpm: No such file or directory
nextcloud       | [cont-init.d] 02-fix-perms.sh: exited 1.
nextcloud       | [cont-finish.d] executing container finish scripts...
nextcloud       | [cont-finish.d] done.
nextcloud       | [s6-finish] waiting for services.
nextcloud       | [s6-finish] sending all processes the TERM signal.
nextcloud_cron  | [s6-finish] sending all processes the KILL signal and exiting.
nextcloud_news_updater | [s6-finish] sending all processes the KILL signal and exiting.
nextcloud_cron  | [s6-init] making user provided files available at /var/run/s6/etc...exited 0.
nextcloud_news_updater | [s6-init] making user provided files available at /var/run/s6/etc...exited 0.
nextcloud_cron  | [s6-init] ensuring user provided files have correct perms...exited 0.
nextcloud_cron  | [fix-attrs.d] applying ownership & permissions fixes...
nextcloud_cron  | [fix-attrs.d] done.
nextcloud_cron  | [cont-init.d] executing container initialization scripts...
nextcloud_cron  | [cont-init.d] 00-fix-logs.sh: executing... 
nextcloud_cron  | [cont-init.d] 00-fix-logs.sh: exited 0.
nextcloud_cron  | [cont-init.d] 01-fix-uidgid.sh: executing... 
nextcloud_cron  | [cont-init.d] 01-fix-uidgid.sh: exited 0.
nextcloud_cron  | [cont-init.d] 02-fix-perms.sh: executing... 
nextcloud_news_updater | [s6-init] ensuring user provided files have correct perms...exited 0.
nextcloud_cron  | Fixing perms...
nextcloud_news_updater | [fix-attrs.d] applying ownership & permissions fixes...
nextcloud_cron  | chown: /var/run/nginx: No such file or directory
nextcloud_cron  | chown: /var/run/php-fpm: No such file or directory
nextcloud_news_updater | [fix-attrs.d] done.
nextcloud_cron  | [cont-init.d] 02-fix-perms.sh: exited 1.
nextcloud_news_updater | [cont-init.d] executing container initialization scripts...
nextcloud_news_updater | [cont-init.d] 00-fix-logs.sh: executing... 
nextcloud_news_updater | [cont-init.d] 00-fix-logs.sh: exited 0.
nextcloud_news_updater | [cont-init.d] 01-fix-uidgid.sh: executing... 
nextcloud_cron  | [cont-finish.d] executing container finish scripts...
nextcloud_cron  | [cont-finish.d] done.
nextcloud_news_updater | [cont-init.d] 01-fix-uidgid.sh: exited 0.
nextcloud_cron  | [s6-finish] waiting for services.
nextcloud_news_updater | [cont-init.d] 02-fix-perms.sh: executing... 
nextcloud_news_updater | Fixing perms...
nextcloud_news_updater | chown: /var/run/nginx: No such file or directory
nextcloud_news_updater | chown: /var/run/php-fpm: No such file or directory
nextcloud_news_updater | [cont-init.d] 02-fix-perms.sh: exited 1.
nextcloud_news_updater | [cont-finish.d] executing container finish scripts...
nextcloud_news_updater | [cont-finish.d] done.
nextcloud_news_updater | [s6-finish] waiting for services.
nextcloud_cron  | [s6-finish] sending all processes the TERM signal.
nextcloud_news_updater | [s6-finish] sending all processes the TERM signal.
nextcloud_db    | Warning: Unable to load '/usr/share/zoneinfo/leap-seconds.list' as time zone. Skipping it.
nextcloud       | [s6-finish] sending all processes the KILL signal and exiting.
nextcloud exited with code 1
nextcloud       | [s6-init] making user provided files available at /var/run/s6/etc...exited 0.
nextcloud       | [s6-init] ensuring user provided files have correct perms...exited 0.
nextcloud       | [fix-attrs.d] applying ownership & permissions fixes...
nextcloud       | [fix-attrs.d] done.
nextcloud       | [cont-init.d] executing container initialization scripts...
nextcloud       | [cont-init.d] 00-fix-logs.sh: executing... 
nextcloud       | [cont-init.d] 00-fix-logs.sh: exited 0.
nextcloud       | [cont-init.d] 01-fix-uidgid.sh: executing... 
nextcloud       | [cont-init.d] 01-fix-uidgid.sh: exited 0.
nextcloud       | [cont-init.d] 02-fix-perms.sh: executing... 
nextcloud       | Fixing perms...
nextcloud       | chown: /var/run/nginx: No such file or directory
nextcloud       | chown: /var/run/php-fpm: No such file or directory
nextcloud       | [cont-init.d] 02-fix-perms.sh: exited 1.
nextcloud       | [cont-finish.d] executing container finish scripts...
nextcloud       | [cont-finish.d] done.
nextcloud       | [s6-finish] waiting for services.
nextcloud       | [s6-finish] sending all processes the TERM signal.
nextcloud_cron  | [s6-finish] sending all processes the KILL signal and exiting.
nextcloud_news_updater | [s6-finish] sending all processes the KILL signal and exiting.
nextcloud_cron exited with code 1
nextcloud_news_updater exited with code 1

@Blazin64 Maybe linked to SELinux? Can you temporarily disable it with setenforce 0 command?

Disabling SELinux didn't help, unfortunately. I do have some good news, though.

I looked up the Docker version I was running (1.13.1), which led me to discover that it was about 2 years old. Since no newer version is available on official CentOS repositories, I enabled Docker's own repository and installed Docker CE from there. Everything works now.

Consider the problem solved. Sorry for the trouble.