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

no config file created #99

Closed dkebler closed 2 years ago

dkebler commented 2 years ago

just doing a quick eval of radicale but looks like your Dockerfile is not creating the intial config file

radicale | [2021-10-12 18:25:55 +0000] [7] [CRITICAL] Invalid configuration: Failed to load config file '/config/config': No such file: '/config/config'

so after running once I created config file from your example in my host volume and then restarted and that seemed to work.

using compose file

version: '3.7'

services:
  radicale:
    image: tomsquest/docker-radicale
    container_name: radicale
    ports:
      - 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://localhost:5232 || exit 1
      interval: 30s
      retries: 3
#   restart: unless-stopped
    volumes:
      - ./data:/data
      - ./config:/config:ro
tomsquest commented 2 years ago

Hi @dkebler ,

The image has the config file in it (COPY config /config/config in the Dockerfile). So it is working without requiring a config volume.

But if you specify the config volume yourself, Docker will shadow the /config directory with the one you specified, hence the config file "disappear". That's why you have to create it before in your /config folder that you want to mount.

Is your issue related to something different ?