Volume outside container (docker)


#1

Hi I’m using 10.0.8 installed with docker. I’m trying to save my data on a place outside of the container.
In the docker-compose.yml:

volumes:
  files:/mnt/data
  /data/VolumeOutsideContainer:/mnt/data

If I type :
volumes:
files: /data/VolumeOutsideContainer

It saves it on the struct /data/VolumeOutsideContainer inside the container.

This doesn’t work. In my mind this is all I should be needing to save the datafiles outsinde the container. Does somebody else have an input?


#2

First I’d recommend you to read oficial documentation and tutorials about docker. Relevant info is in https://docs.docker.com/compose/compose-file/#volumes

I’m not sure if you should modify the docker-compose.yml file. I mean, that’s how ownCloud is intended to be deployed with docker. Unless you know what you’re doing, I wouldn’t change how things are deployed.