我想在 Redis 中存储 json 类型,因此我设置将 RedisJSON 模块与 docker-compose 一起使用。但是,我一直无法运行它。代码如下。我还尝试使用 redis.conf 填充与命令相同的参数,但发生了分段错误。我的脚步怎么了?
version: '3.8'
services:
redis:
container_name: redis
hostname: redis
image: redis:7.0.0-alpine
command: redis-server --loadmodule /etc/redis/modules/rejson.so
volumes:
- /etc/redis/redis.conf:/etc/redis/redis.conf
- /etc/redis/modules/rejson.so:/etc/redis/modules/rejson.so
Run Code Online (Sandbox Code Playgroud)
Node.js 版本:16.14.1
Node Redis 版本:4.0.6
平台:Mac OS 12.3.1
分段错误是由于不存在的includes选项造成的。重复了以下消息。执行格式错误是什么意思?
# oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
# Redis version=7.0.0, bits=64, commit=00000000, modified=0, pid=1, just started
# Configuration loaded
* monotonic clock: POSIX clock_gettime
# Warning: Could not create server TCP listening socket ::1:6380: bind: …Run Code Online (Sandbox Code Playgroud)