Grokzen / Grokzen/docker-redis-cluster
Invalid Locale_Name on latest image 7.2.5
- Dominant language
- Shell
- Stars
- 1.5k
- Forks
- 558
- PR merge metrics
- No merged PRs in 30d
Description
### Environment
* docker-redis-cluster version: 7.2.5
* docker compose : v2.26.1-desktop.1
Service declaration in docker compose file
```
RedisCluster:
restart: always
image: grokzen/redis-cluster:7.2.5
ports:
- "30001:30001"
- "30002:30002"
- "30003:30003"
- "30004:30004"
- "30005:30005"
- "30006:30006"
environment:
- IP=0.0.0.0
- INITIAL_PORT=30001
- DEBUG=true
```
### Steps to Reproduce
1. docker-compose up
Expected : The container to run with redis-server services running per cluster config
Happened: The container runs and I can see all 6 redis-server instaces start up and they all fail with
```RedisCluster-1 | 67:M 20 Aug 2024 16:54:16.502 # Failed to configure LOCALE for invalid locale name.
```
I can also see this warning upon startup
```RedisCluster-1 | bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
```
I believe that is the cause .
The locale is not successfully installed at https://github.com/Grokzen/docker-redis-cluster/blob/7922e1f9a4307231e9416ac7c1963a97347dc8de/Dockerfile#L17
If I exec into the container and run the same locale-gen command it fails.
To rectify it , I needed to run this instead
```echo "LC_ALL=en_US.UTF-8" >> /etc/environment
echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
echo "LANG=en_US.UTF-8" > /etc/locale.conf
locale-gen en_US.UTF-8
```
Once running that and restarting the container , everything worked correctly.
Summary: `locale-gen en_US.UTF-8` is failing because it is not found in the config files, therefore this results in the servers not starting
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.