Skip to content

feat: add general occ subcommand to owncloud entrypoint#462

Merged
DeepDiver1975 merged 1 commit into
masterfrom
feat/occ-entrypoint-subcommand
May 21, 2026
Merged

feat: add general occ subcommand to owncloud entrypoint#462
DeepDiver1975 merged 1 commit into
masterfrom
feat/occ-entrypoint-subcommand

Conversation

@DeepDiver1975
Copy link
Copy Markdown
Contributor

@DeepDiver1975 DeepDiver1975 commented May 21, 2026

Summary

  • Adds a new occ subcommand to /usr/bin/owncloud in the v24.04 image
  • Runs full ownCloud initialization (/etc/owncloud.d/*.sh) then execs occ with forwarded arguments — without starting Apache
  • Applies to any image built on owncloud/base:24.04

Usage

docker-compose.yml:

command: ["/usr/bin/owncloud", "occ", "<occ-command>", "<args...>"]

docker run:

docker run --rm \
  --network <oc-network> \
  -e OWNCLOUD_DB_TYPE=mysql \
  -e OWNCLOUD_DB_HOST=db \
  -e OWNCLOUD_DB_NAME=owncloud \
  -e OWNCLOUD_DB_USERNAME=owncloud \
  -e OWNCLOUD_DB_PASSWORD=owncloud \
  owncloud/server \
  /usr/bin/owncloud occ <occ-command> [args...]

Examples:

List all available occ commands:

# docker run
docker run --rm ... owncloud/server /usr/bin/owncloud occ list

# docker-compose
command: ["/usr/bin/owncloud", "occ", "list"]

Start the Windows Network Drive SMB listener (long-running):

# docker run
docker run \
  --network <oc-network> \
  -e OWNCLOUD_DB_TYPE=mysql \
  ... \
  owncloud/server \
  /usr/bin/owncloud occ wnd:listen myhost myshare myuser --password-file=/run/secrets/wnd_password

# docker-compose
command: ["/usr/bin/owncloud", "occ", "wnd:listen", "myhost", "myshare", "myuser", "--password-file=/run/secrets/wnd_password"]

Test Plan

  • Build owncloud/base:24.04 with this change
  • Run command: ["/usr/bin/owncloud", "occ", "list"] — verify occ command list prints, no Apache started, container exits 0
  • Verify existing server, install, migrate, installed subcommands still work normally

Related

Companion PR in owncloud-docker/server: owncloud-docker/server#618 (will be updated to drop the overlay once this merges)

🤖 Generated with Claude Code

Allows running any occ command with full ownCloud initialization
(DB, config, etc.) but without starting Apache:

  /usr/bin/owncloud occ <occ-command> [args...]

Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com>
@DeepDiver1975 DeepDiver1975 force-pushed the feat/occ-entrypoint-subcommand branch from 5c51f7c to 82e2e48 Compare May 21, 2026 10:48
@DeepDiver1975 DeepDiver1975 merged commit 4ec144f into master May 21, 2026
5 checks passed
@DeepDiver1975 DeepDiver1975 deleted the feat/occ-entrypoint-subcommand branch May 21, 2026 12:12
DeepDiver1975 added a commit to owncloud-docker/server that referenced this pull request May 21, 2026
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants