Nextcloud's docker image with extra utilities
Go to file
jiriks74 37c52c6887
Some checks are pending
Build / build-stable (push) Successful in 14m48s
Build / build-latest (push) Waiting to run
feat: Update images weekly to receive apt update
Receive updates from apt so that there is no need to rebuild the image
to receive security updates.

Better safe than sorry.
2024-04-28 04:10:19 +02:00
.gitea/workflows feat: Update images weekly to receive apt update 2024-04-28 04:10:19 +02:00
.envrc feat(nix): Add basic Nix environment setup 2024-04-19 05:47:23 +02:00
.gitignore feat(ci/cd): Automatic builds based on latest image (#1) 2024-04-19 05:43:39 +02:00
default.nix feat(nix): Add basic Nix environment setup 2024-04-19 05:47:23 +02:00
Dockerfile fix(Dockerfile): Remove useless comment 2024-04-28 02:40:51 +02:00
LICENSE Initial commit 2023-09-19 19:10:06 +02:00
README.md feat: Update images weekly to receive apt update 2024-04-28 04:10:19 +02:00

docker-nextcloud-extended

Open issues Closed issues Last Commit

Docker Pulls Docker Stars Docker Size

Nextcloud's docker image with extra utilities

Note

The images with tags latest and stable are being rebuilt every week even if there isn't a Nextcloud update to get security updates form apt.

Important

I do not recommend automatically pulling the latest and stable tags as they track upstream image and they can update you to the next major version without you intending to do so.

If you'd like to receive the weekly updates tag your images with the major version like jiriks74/nextcloud-extended:28. Keep in mind that these version tags are not automatically updated when new major version is out for the stable tag upstream.

This image is availabe on DockerHub

Utilities added

  • gnupg2 - Used by Snappymail to encrypt and sign emails
  • ffmpeg - Used by Video converter app
  • aria2 and youtube-dl - Used by NCDownloader app
  • libmagickcore-dev - To fix Module php-imagick in this instance has no SVG support error

Setup

I recommend using docker compose to set up Nextcloud as it's easier to manage than palin Docker.

Basic docker-compose.yml

Important

Don't forget to change the passwords (similar to <password>) and if you'd like to change the database name and user too.

services:
  db:
    image: mariadb
    restart: always
    command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
    volumes:
      - ./db:/var/lib/mysql
    environment:
      - MYSQL_ROOT_PASSWORD=<db_root_password>
      - MYSQL_PASSWORD=<db_password>
      - MYSQL_DATABASE=nextcloud
      - MYSQL_USER=nextcloud
    healthcheck:
      test: mariadb-admin ping -h 127.0.0.1 -u $$MYSQL_USER --password=$$MYSQL_PASSWORD
      start_period: 5s
      interval: 5s
      timeout: 5s
      retries: 55

  app:
    image: jiriks74/nextcloud-extended:stable
    restart: always
    ports:
      - 80:80
    links:
      - db
      - redis
    depends_on:
      redis:
        condition: service_healthy
      db:
        condition: service_healthy
    volumes:
      - ./nextcloud:/var/www/html
      - ./data:/var/www/html/data
    environment:
      - MYSQL_PASSWORD=<db_password>
      - MYSQL_DATABASE=nextcloud
      - MYSQL_USER=nextcloud
      - MYSQL_HOST=db
      - REDIS_HOST=redis
      - REDIS_HOST_PASSWORD=<redis_password>
    healthcheck:
      test: curl -sSf 'http://localhost/status.php' | grep '"installed":true' | grep '"maintenance":false' | grep '"needsDbUpgrade":false' || exit 1
      interval: 10s
      timeout: 5s
      retries: 10

  redis:
    image: redis
    restart: always
    command: redis-server --requirepass <redis_password>
    volumes:
      - ./redis:/data
    healthcheck:
      test: [ "CMD", "redis-cli", "--raw", "incr", "ping" ]

Tips

Cron job

If you're getting error simmilar to Last job execution ran a day ago. Something seems wrong. try to add this to your cron tab (sudo crontab -e):

0,5,10,15,20,25,30,35,40,45,50,55 * * * * docker exec -u www-data <container_name> php -f /var/www/html/cron.php

Important

Don't forget to change the <container_name> to your Nextcloud's container name (eg. docker-nextcloud_app)