Nextcloud Docker Notes
Docker Tips | Docker github repo | nc Docker Hub | Docker Nextcloud doc | qua GAE Docker notes
docker run -d -p 80:80 -p 443:443 -v $HOME/nextcloud:/var/www/html nextcloud
docker start <containerID> | docker exec -it <containerID> bash |
docker inspect <container>
docker exec -it nc:2 bash
docker exec <container> cat /var/log/dpkg.log
docker image ls -f "dangling=true"
docker history <container>
docker tag 994bdf6c863a ncssl:1 (rename imageID to name:tag)
docker inspect --format='{{.Id}} {{.Parent}}' $(docker images --filter since=<containerID> -q) (find dependent child images)
nextcloud container official: php 7.3.9, Apache/2.4.38 (Debian); does not have ssh Nextcloud Docker debian version is 10 (Buster): cat /etc/os-release
/var/www/html ls custom_apps bruteforcesettings | carnet | files_markdown | files_rightclick | notes
dpkg -l | grep sql ii libaprutil1-dbd-sqlite3:amd64 1.6.1-4 Apache Portable Runtime Utility Library – SQLite3 Driver ii libsqlite3-0:amd64 3.27.2-3 SQLite 3 shared library
status.php output: {“installed”:true,“maintenance”:false,“needsDbUpgrade”:false,“version”:“16.0.4.1”,“versionstring”:“16.0.4”,“edition”:“”,“productname”:“Nextcloud”}
Deploy Nextcloud thru Docker | Guide to Docker Volumes |
status.php output: {“installed”:true,“maintenance”:false,“needsDbUpgrade”:false,“version”:“16.0.4.1”,“versionstring”:“16.0.4”,“edition”:“”,“productname”:“Nextcloud”} ___ Persistent data The Nextcloud installation and all data beyond what lives in the database (file uploads, etc) is stored in the unnamed docker volume volume /var/www/html. The docker daemon will store that data within the docker directory /var/lib/docker/volumes/.... That means your data is saved even if the container crashes, is stopped or deleted.
A named Docker volume or a mounted host directory should be used for upgrades and backups. To achieve this you need one volume for your database container and one for Nextcloud.
/var/www/html/ folder where all Nextcloud data lives
$ docker run -d -p 80:80 -p 443:443 -v nextcloud:/var/www/html nextcloud
Overview of the folders that can be mounted as volumes:
/var/www/html
Main folder, needed for updating/var/www/html/custom_apps
installed / modified apps/var/www/html/config
local configuration/var/www/html/data
the actual data of your Nextcloud/var/www/html/themes/<YOU_CUSTOM_THEME>
theming/branding
# env
HOSTNAME=cd...
PHP_VERSION=7.3.9
APACHE_CONFDIR=/etc/apache2
PHP_MD5=
NEXTCLOUD_VERSION=16.0.4
PHP_INI_DIR=/usr/local/etc/php
GPG_KEYS=... ...
PHP_LDFLAGS=-Wl,-O1 -Wl,--hash-style=both -pie
PWD=/var/www/html
HOME=/root
PHP_SHA256=...
PHPIZE_DEPS=autoconf dpkg-dev file g++ gcc libc-dev make pkg-config re2c
TERM=xterm
PHP_URL=https://www.php.net/get/php-7.3.9.tar.xz/from/this/mirror
PHP_EXTRA_CONFIGURE_ARGS=--with-apxs2 --disable-cgi
SHLVL=1
PHP_CFLAGS=-fstack-protector-strong -fpic -fpie -O2
APACHE_ENVVARS=/etc/apache2/envvars
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
PHP_EXTRA_BUILD_DEPS=apache2-dev
PHP_ASC_URL=https://www.php.net/get/php-7.3.9.tar.xz.asc/from/this/mirror
PHP_CPPFLAGS=-fstack-protector-strong -fpic -fpie -O2
_=/usr/bin/env
___ Install Nextcloud with Docker on Debian 10 Buster | Nextcloud via Docker with nginx reverse proxy ___