From 54abe3cd5b745ea491d9376033b85a50b4772a37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BCller?= <1005065+DeepDiver1975@users.noreply.github.com> Date: Wed, 20 May 2026 16:46:54 +0200 Subject: [PATCH 1/6] feat(oc11): add general occ subcommand to owncloud entrypoint MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com> --- v24.04/overlay/usr/bin/owncloud | 72 +++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100755 v24.04/overlay/usr/bin/owncloud diff --git a/v24.04/overlay/usr/bin/owncloud b/v24.04/overlay/usr/bin/owncloud new file mode 100755 index 0000000..74570a2 --- /dev/null +++ b/v24.04/overlay/usr/bin/owncloud @@ -0,0 +1,72 @@ +#!/usr/bin/env bash +set -eo pipefail +[[ "${DEBUG}" == "true" ]] && set -x + +if [[ -z "${OWNCLOUD_ENTRYPOINT_INITIALIZED}" ]]; then + for FILE in $(find /etc/entrypoint.d -iname "*.sh" | sort); do + # shellcheck disable=SC1090,SC2086 + source ${FILE} + done +fi + +case ${1} in +install) + COMMAND="occ maintenance:install --no-interaction --data-dir ${OWNCLOUD_VOLUME_FILES}" + [[ -n "${OWNCLOUD_DB_TYPE}" ]] && COMMAND="${COMMAND} --database ${OWNCLOUD_DB_TYPE}" + [[ -n "${OWNCLOUD_DB_NAME}" ]] && COMMAND="${COMMAND} --database-name ${OWNCLOUD_DB_NAME}" + [[ -n "${OWNCLOUD_DB_USERNAME}" ]] && COMMAND="${COMMAND} --database-user ${OWNCLOUD_DB_USERNAME}" + [[ -n "${OWNCLOUD_DB_PASSWORD}" ]] && COMMAND="${COMMAND} --database-pass ${OWNCLOUD_DB_PASSWORD}" + [[ -n "${OWNCLOUD_DB_HOST}" ]] && COMMAND="${COMMAND} --database-host ${OWNCLOUD_DB_HOST}" + [[ -n "${OWNCLOUD_DB_PREFIX}" ]] && COMMAND="${COMMAND} --database-table-prefix ${OWNCLOUD_DB_PREFIX}" + [[ -n "${OWNCLOUD_ADMIN_USERNAME}" ]] && COMMAND="${COMMAND} --admin-user ${OWNCLOUD_ADMIN_USERNAME}" + [[ -n "${OWNCLOUD_ADMIN_PASSWORD}" ]] && COMMAND="${COMMAND} --admin-pass ${OWNCLOUD_ADMIN_PASSWORD}" + + set +e + ${COMMAND} + RES=$? + set -e + + if [[ "${RES}" -ge "1" ]]; then + exit ${RES} + else + exit 0 + fi + ;; +migrate) + COMMAND="occ upgrade --no-interaction" + + set +e + ${COMMAND} + RES=$? + set -e + + if [[ "${RES}" -ge "4" ]]; then + exit ${RES} + else + exit 0 + fi + ;; +installed) + if [[ $(occ -V | awk -F- '$1=="ownCloud is not installed "{print "false"}') == "false" ]]; then + exit 1 + else + exit 0 + fi + ;; +occ) + for FILE in $(find /etc/owncloud.d -iname "*.sh" | sort); do + # shellcheck disable=SC1090,SC2086 + source ${FILE} + done + shift + exec occ "$@" + ;; +*) + for FILE in $(find /etc/owncloud.d -iname "*.sh" | sort); do + # shellcheck disable=SC1090,SC2086 + source ${FILE} + done + + exec "$@" + ;; +esac From 4f59d59cd25ed340d254166a1fed95b371741328 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BCller?= <1005065+DeepDiver1975@users.noreply.github.com> Date: Wed, 20 May 2026 16:52:07 +0200 Subject: [PATCH 2/6] style(oc11): add blank line in occ case for consistency MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com> --- v24.04/overlay/usr/bin/owncloud | 1 + 1 file changed, 1 insertion(+) diff --git a/v24.04/overlay/usr/bin/owncloud b/v24.04/overlay/usr/bin/owncloud index 74570a2..f12eba5 100755 --- a/v24.04/overlay/usr/bin/owncloud +++ b/v24.04/overlay/usr/bin/owncloud @@ -58,6 +58,7 @@ occ) # shellcheck disable=SC1090,SC2086 source ${FILE} done + shift exec occ "$@" ;; From ed81f91ddd88f14238770ccebcd089d6b9734b06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BCller?= <1005065+DeepDiver1975@users.noreply.github.com> Date: Wed, 20 May 2026 16:52:44 +0200 Subject: [PATCH 3/6] docs: document occ subcommand for oc11 image MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com> --- README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/README.md b/README.md index 866639b..127199f 100644 --- a/README.md +++ b/README.md @@ -42,6 +42,22 @@ ownCloud is an open-source file sync, share and content collaboration software t - 8080 +## Running occ commands + +The oc11 image supports running any `occ` command with full initialization +(database, config, etc.) but without starting Apache, by using the `occ` +subcommand: + +```yaml +command: ["/usr/bin/owncloud", "occ", "", ""] +``` + +Example — start the Windows Network Drive SMB listener: + +```yaml +command: ["/usr/bin/owncloud", "occ", "wnd:listen", "myhost", "myshare", "myuser", "--password-file=/run/secrets/wnd_password"] +``` + ## Environment variables None From 8489b38b4be16e862b02444a2ad6888b165e6df4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BCller?= <1005065+DeepDiver1975@users.noreply.github.com> Date: Wed, 20 May 2026 16:53:57 +0200 Subject: [PATCH 4/6] docs: clarify occ subcommand version scope and usage context MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com> --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 127199f..bd58b3f 100644 --- a/README.md +++ b/README.md @@ -44,9 +44,9 @@ ownCloud is an open-source file sync, share and content collaboration software t ## Running occ commands -The oc11 image supports running any `occ` command with full initialization -(database, config, etc.) but without starting Apache, by using the `occ` -subcommand: +Starting with `11.0.0-prealpha`, the image supports running any `occ` command +with full initialization (database, config, etc.) but without starting Apache, +by using the `occ` subcommand in `docker-compose.yml`: ```yaml command: ["/usr/bin/owncloud", "occ", "", ""] From c932a7002b567205fd707b897df641a232a106b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BCller?= <1005065+DeepDiver1975@users.noreply.github.com> Date: Thu, 21 May 2026 16:44:36 +0200 Subject: [PATCH 5/6] feat(oc11): move occ subcommand to base image MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The occ) case is now part of owncloud/base (owncloud-docker/base#462), so the overlay override in this repo is no longer needed. Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com> --- v24.04/overlay/usr/bin/owncloud | 73 --------------------------------- 1 file changed, 73 deletions(-) delete mode 100755 v24.04/overlay/usr/bin/owncloud diff --git a/v24.04/overlay/usr/bin/owncloud b/v24.04/overlay/usr/bin/owncloud deleted file mode 100755 index f12eba5..0000000 --- a/v24.04/overlay/usr/bin/owncloud +++ /dev/null @@ -1,73 +0,0 @@ -#!/usr/bin/env bash -set -eo pipefail -[[ "${DEBUG}" == "true" ]] && set -x - -if [[ -z "${OWNCLOUD_ENTRYPOINT_INITIALIZED}" ]]; then - for FILE in $(find /etc/entrypoint.d -iname "*.sh" | sort); do - # shellcheck disable=SC1090,SC2086 - source ${FILE} - done -fi - -case ${1} in -install) - COMMAND="occ maintenance:install --no-interaction --data-dir ${OWNCLOUD_VOLUME_FILES}" - [[ -n "${OWNCLOUD_DB_TYPE}" ]] && COMMAND="${COMMAND} --database ${OWNCLOUD_DB_TYPE}" - [[ -n "${OWNCLOUD_DB_NAME}" ]] && COMMAND="${COMMAND} --database-name ${OWNCLOUD_DB_NAME}" - [[ -n "${OWNCLOUD_DB_USERNAME}" ]] && COMMAND="${COMMAND} --database-user ${OWNCLOUD_DB_USERNAME}" - [[ -n "${OWNCLOUD_DB_PASSWORD}" ]] && COMMAND="${COMMAND} --database-pass ${OWNCLOUD_DB_PASSWORD}" - [[ -n "${OWNCLOUD_DB_HOST}" ]] && COMMAND="${COMMAND} --database-host ${OWNCLOUD_DB_HOST}" - [[ -n "${OWNCLOUD_DB_PREFIX}" ]] && COMMAND="${COMMAND} --database-table-prefix ${OWNCLOUD_DB_PREFIX}" - [[ -n "${OWNCLOUD_ADMIN_USERNAME}" ]] && COMMAND="${COMMAND} --admin-user ${OWNCLOUD_ADMIN_USERNAME}" - [[ -n "${OWNCLOUD_ADMIN_PASSWORD}" ]] && COMMAND="${COMMAND} --admin-pass ${OWNCLOUD_ADMIN_PASSWORD}" - - set +e - ${COMMAND} - RES=$? - set -e - - if [[ "${RES}" -ge "1" ]]; then - exit ${RES} - else - exit 0 - fi - ;; -migrate) - COMMAND="occ upgrade --no-interaction" - - set +e - ${COMMAND} - RES=$? - set -e - - if [[ "${RES}" -ge "4" ]]; then - exit ${RES} - else - exit 0 - fi - ;; -installed) - if [[ $(occ -V | awk -F- '$1=="ownCloud is not installed "{print "false"}') == "false" ]]; then - exit 1 - else - exit 0 - fi - ;; -occ) - for FILE in $(find /etc/owncloud.d -iname "*.sh" | sort); do - # shellcheck disable=SC1090,SC2086 - source ${FILE} - done - - shift - exec occ "$@" - ;; -*) - for FILE in $(find /etc/owncloud.d -iname "*.sh" | sort); do - # shellcheck disable=SC1090,SC2086 - source ${FILE} - done - - exec "$@" - ;; -esac From f62e9ef88082e9d4ec8dd33de50c90d0d6b23c39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BCller?= <1005065+DeepDiver1975@users.noreply.github.com> Date: Thu, 21 May 2026 16:45:17 +0200 Subject: [PATCH 6/6] chore(oc11): bump base image digest to pick up occ subcommand MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com> --- v24.04/Dockerfile.multiarch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v24.04/Dockerfile.multiarch b/v24.04/Dockerfile.multiarch index 8b3c82b..448a528 100644 --- a/v24.04/Dockerfile.multiarch +++ b/v24.04/Dockerfile.multiarch @@ -1,4 +1,4 @@ -FROM owncloud/base:24.04@sha256:e492580f249e59b480c0036b43ec62387172d39f1225d2be75520d18c95c91c9 +FROM owncloud/base:24.04@sha256:a809b488239e2e776d7f5e99e208049d178ac8c94fa1928aa0545b08c7c0d0c3 ARG TARBALL_URL