Obscure way to use unix socket for Redis
Nobody has claimed this yet.
- Dominant language
- Shell
- Stars
- 7.4k
- Forks
- 1.9k
- PR merge metrics
- No merged PRs in 30d
Description
The parameter passing causes problems from the Docker container environment all the way to the phpredis->pconnect when using unix socket. The phpredis is kind of requiring the port setting to -1 if the host is actually a unix socket path starting with '/'. However in this image, the entrypoint.sh defaults REDIS_HOST_PORT to 6379, which would eventually passing into phpredis.
This would work though:
environment:
REDIS_HOST: /tmp/redis.sock
REDIS_HOST_PORT: -1
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by inspecting entrypoint.sh and how REDIS_HOST and REDIS_HOST_PORT are passed into the container environment. Reproduce the Unix-socket configuration with /tmp/redis.sock and port -1, then compare it with the default port behavior. Done means the documented socket setup works without an obscure manual workaround.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, redis, shell
- Domain
- databases, devops, infrastructure
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100