tomsquest / docker-radicale

Docker image for Radicale calendar and contact server :calendar: + security :closed_lock_with_key: + addons :rocket:
GNU General Public License v3.0
562 stars 80 forks source link

How to use actual docker volumes INSTEAD of volume mounts? #98

Closed symgryph closed 2 years ago

symgryph commented 2 years ago

I was playing around with runing 'rootless' docker (think change using the userns features) and wanted to use internal volumes instead. COuldn't figure it out. Kept getting '

ERROR: for radicale Cannot start service radicale: failed to create shim: OCI runtime create failed: invalid mount {Destination:data Type:bind Source:/var/lib/docker/volumes/397cb3669d401faf85adc54e5dfdbf76f33f3a7ae8bfdfbd05726ef17b127cf1/_data Options:[rbind]}: mount destination data not absolute: unknown

My docker-compose.yml follows:

version: '3.7'

volumes:
  data:
    name: data
services:
  radicale:
    image: radicale:latest
    container_name: radicale
    ports:
      - 127.0.0.1:5232:5232
    init: true
    read_only: true
    security_opt:
      - no-new-privileges:true
    cap_drop:
      - ALL
    cap_add:
      - SETUID
      - SETGID
      - CHOWN
      - KILL
    healthcheck:
      test: curl -f http://127.0.0.1:5232 || exit 1
      interval: 30s
      retries: 3
    restart: unless-stopped
    volumes:
      - data:/data
meichthys commented 2 years ago

You're not using the image from this project. I think you want to use tomsquest/docker-radicale

symgryph commented 2 years ago

closed