skip to Main Content

I’m following the steps explained here:

I have a docker-compose.yml file like this:

version: '3'

services:

  backend:
    build: server/
    image: cno/api
    environment:
      NODE_ENV: "production"
    ports:
      - "9114:9114"
    networks:
      - cnonetwork
    extra_hosts:
      - "host.docker.internal:host-gateway"
    depends_on:
      - redis

  redis:
    build: redis/
    image: cno/redis
    networks:
      - cnonetwork

  frontend:
    build: client/
    image: cno/client
    networks:
      - cnonetwork

  rp:
    build: reverse-proxy/
    image: cno/rp
    depends_on:
      - frontend
      - backend
    ports:
      - "80:80"
    networks:
      - cnonetwork


networks:
  cnonetwork:

And my Dockerfile of Redis is here:

FROM redis
COPY redis.conf /usr/local/etc/redis/redis.conf
CMD [ "redis-server", "/usr/local/etc/redis/redis.conf" ]

The redis.conf being the same suggested in the documentation (https://github.com/redis/redis/blob/unstable/redis.conf). My container exits with this error:

*** FATAL CONFIG FILE ERROR (Redis 7.0.9) ***
Reading the configuration file, at line 415
>>> 'locale-collate ""'
Bad directive or wrong number of arguments

I have the same error when I change the config file:

*** FATAL CONFIG FILE ERROR (Redis 7.0.9) ***
Reading the configuration file, at line 415
>>> 'locale-collate "en_US.UTF-8"'
Bad directive or wrong number of arguments

What am I doing wrong?

2

Answers


  1. It looks like you are using the unstable version of the redis.conf file with the Redis 7.0.9 release of redis-server.

    This version does not yet appear to support the locale-collate configuration parameter, which is probably why it errors when faced with a config file that contains this.

    Here’s the code for the config file for 7.0.9 tag which doesn’t mention locale-collate:

    https://github.com/redis/redis/blob/7.0.9/src/config.c

    I’d advise using the 7.0.9 version of the config file, or if you really need this parameter then compile an unstable version of redis-server.

    Here’s the 7.0.9 config file:

    https://github.com/redis/redis/blob/7.0.9/redis.conf

    Login or Signup to reply.
  2. Always refer to https://github.com/redis/redis/blob/<redis_version>/redis.conf. For example if you are using 7.0.11 refer to https://github.com/redis/redis/blob/7.0.11/redis.conf. In 7.0.11 the following section is not even defined.

    # Set the local environment which is used for string comparison operations, and
    # also affect the performance of Lua scripts. Empty String indicates the locale
    # is derived from the environment variables.
    locale-collate ""
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search