The above Dockerfile will use the current owncloud:latest image from Docker Hub, and then install smbclient into it. You want to do the update, install and cleanup in one step so it gets saved as only one layer in the Docker filesystem, saving space.

You can then put that together with the official MySQL Docker Image and a few volumes to have a fully working OwnCloud setup with docker-compose.

Create the directories that are mounted there, set the password to something sensible, and docker-compose up !

One thing though. OwnCloud doesn’t have any built-in account lockout policy, so I wouldn’t go putting this as it is on the ‘Net just yet. You’ll want something in front of it for security, like nginx. You’ll also want HTTPS if you’re doing that.