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

docker-compose fails to start container #137

Closed inglar closed 10 months ago

inglar commented 10 months ago

docker-compose.yaml

# Can be enhanced with additional compose file 
# See also https://docs.docker.com/compose/production/#modify-your-compose-file-for-production

version: '3.7'

services:
  radicale:
    image: tomsquest/docker-radicale
    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
    deploy:
      resources:
        limits:
          memory: 256M
          pids: 50
    healthcheck:
      test: curl -f http://127.0.0.1:5232 || exit 1
      interval: 30s
      retries: 3
    restart: unless-stopped
    volumes:
      - ./data:/data
docker-compose up -d
ERROR: The Compose file './docker-compose.yaml' is invalid because:
services.radicale.deploy.resources.limits value Additional properties are not allowed ('pids' was unexpected)

If i comment pids: 50 line it successfully starts. Can't figure out what is the problem with default docker compose file.

tomsquest commented 10 months ago

Hi @inglar ,

What is your version of docker compose ?

Mine is:

$ docker compose version                                                                            
Docker Compose version 2.23.0
inglar commented 10 months ago

@tomsquest, I've got it :) I have too old version

$ docker-compose --version
docker-compose version 1.26.2, build eefe0d31

updated to the latest version

$ docker compose version
Docker Compose version v2.23.1

Now it works. Thanks for the tip.

tomsquest commented 10 months ago

You're welcome. I had the same issue a while ago on my server.