Copying files to owncloud instance


How do i copy a file to an owncloud server via SCP?
I do not know the IP of my owncloud docker in univention.

Thank you.

Edmon Uyan

Either you could do a docker ps and then docker inspect <container-id> to get the IP or you access the volume directly in /var/lib/docker/volumes/<volume-id>/data

Kind regards
bytemine GmbH

I am not sure if I am following it correctly, i SCP to my docker volume and found no files in it:

i was able to SSH within the same session i access univention to my owncloud by accessing univention-app shell owncloud

But I am unable to transfer files that way


why do you want to copy files into your container in the first place? That’s generally a very bad idea as all files not stored in one of the container’s volumes (basically directories from outside the container bind-mounted into the container when it starts) will get lost once the app and therefore the image the container is based on is updated.

On the host system you can copy files to such a bind-mounted directory and they’ll instantly show up in the container the place where the directory is bind-mounted to. You can use the command docker inspect <container-id> in order to see all active mounts (look for the section called "Mounts"). Here’s an example:

        "Mounts": [
                "Type": "bind",
                "Source": "/etc/apt/apt.conf.d/80proxy",
                "Destination": "/etc/apt/apt.conf.d/80proxy",
                "Mode": "ro",
                "RW": false,
                "Propagation": ""

This means that the file named /etc/apt/apt.conf.d/80proxy in the host will be visible as /etc/apt/apt.conf.d/80proxy inside the container. Here the names outside and inside match, however that doesn’t have to be the case:

                "Type": "volume",
                "Name": "88f38cca506c607ec9e8488805fb9b5dcf30673b5082cb7671607b180650813e",
                "Source": "/var/lib/docker/volumes/88f38cca506c607ec9e8488805fb9b5dcf30673b5082cb7671607b180650813e/_data",
                "Destination": "/mnt/data",
                "Driver": "local",
                "Mode": "",
                "RW": true,
                "Propagation": ""

This means that on the host the directory /var/lib/docker/volumes/88f38cca506c607ec9e8488805fb9b5dcf30673b5082cb7671607b180650813e/_data is made available inside the container as /mnt/data. Try creating a file in /var/lib/docker/volumes/88f38cca506c607ec9e8488805fb9b5dcf30673b5082cb7671607b180650813e/_data, then enter the container with univention-app shell owncloud and look for it in /mnt/data.

But again the question: what is your actual use case?

Kind regards,