Docker Install - Volumes to bind?

docker

#1

Hello everyone !

I really love your product. I’ve never seen anything like it. However, I cannot find anywhere what are the path to mount in order to save data on the host.

Could you please indicate me which path to bind ?

Thanks a lot !

Luca


#2

That’s a doog idea. PLease let me also know how to mount other hdd volumes to ucs for sharing big data especially.

kindly


#3

Hey there,

actually I am planning a scenario, having a docker based UCS running in a hetzner cloud environment. I’d like to know if it is possible to run even open-xchange in such a container. But I think that is not possible: [Q&A: Can I Upgrade UCS or Apps From Within the Docker Container?

I’d think it depends on what you are going to do with the docker container. I would say having at least

/etc/
/var/
/usr/
/lib/

as persisten volumes would be a good idea.

Cheers

Sebastian


#4

In the end, what I did was to:

  1. Start the container, with VOLUME_DATA mounted inside of it at /VOLUME_DATA. docker-compose up -d
  2. Log in the container : docker exec -it ucs_container_name bash
  3. Copy root ( / ) to /DATA : rsync -av --progress --exclude run --exclude data --exclude boot --exclude --exclude dev --exclude proc / /VOLUME_DATA
  4. Stop the container : docker-compose down
  5. Remove the commented lines in the docker-compose at the volumes section
  6. Re-start the container docker-compose up -d

Your data will be saved between up and downs.

version: '3'
services:
  ucs:
    image: univention/ucs-generic-amd64
    restart: always
    hostname: subdomain
    ports:
      - 127.0.0.1:50000:443
    environment:
      - domainname=subdomain.yourdomain.com
      #- rootpwd=hereisarootpw
      - container=docker
    volumes:
      - /sys/fs/cgroup:/sys/fs/cgroup:ro
      #- ./VOLUME_DATA/etc:/etc
      #- ./VOLUME_DATA/root:/root
      #- ./VOLUME_DATA/var:/var
      #- ./VOLUME_DATA/home:/home
      #- ./VOLUME_DATA/lib:/lib
      #- ./VOLUME_DATA/lib64:/lib64
      #- ./VOLUME_DATA/sbin:/sbin
      #- ./VOLUME_DATA/usr:/usr
      #- ./VOLUME_DATA/opt:/opt
      #- ./VOLUME_DATA/CUSTOM:/CUSTOM
    tmpfs:
      - /run
      - /run/lock
    cap_add:
      - SYS_ADMIN

#5

This looks nice indeed. Have you tried to install an app via appcenter from within the docker environment?


#6

Yes it works, you can run apps without problems.
You only won’t be able to run apps that are docker-based, since docker-in-docker is not supported in this case.