无法在Docker中启动redis

zd287kbt  于 2022-10-31  发布在  Redis
关注(0)|答案(1)|浏览(173)

我用laradock运行这个项目,第一次用docker启动redis是可以的。但是当我用另一个项目启动的时候,它就不工作了enter image description here
我的停靠文件

FROM redis:5.0-alpine

LABEL maintainer="Mahmoud Zalt <mahmoud@zalt.me>"

## For security settings uncomment, make the dir, copy conf, and also start with the conf, to use it

# RUN mkdir -p /usr/local/etc/redis

# COPY redis.conf /usr/local/etc/redis/redis.conf

VOLUME /data

EXPOSE 6379

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

CMD ["redis-server"]

当我建造Ruby时

Building redis
Sending build context to Docker daemon  65.02kB
Step 1/5 : FROM redis:5.0-alpine
 ---> ff5f1979586f
Step 2/5 : LABEL maintainer="Mahmoud Zalt <mahmoud@zalt.me>"
 ---> Using cache
 ---> a42019d45de4
Step 3/5 : VOLUME /data
 ---> Using cache
 ---> 54611bec2839
Step 4/5 : EXPOSE 6379
 ---> Using cache
 ---> 4c32f18d5cbf
Step 5/5 : CMD ["redis-server"]
 ---> Using cache
 ---> ed80478aed7f
Successfully built ed80478aed7f
Successfully tagged laradock_redis:latest
Starting laradock_redis_1 ... done
Attaching to laradock_redis_1
redis_1                | 
redis_1                |***FATAL CONFIG FILE ERROR***
redis_1                | Reading the configuration file, at line 2
redis_1                | >>> 'requirepass'
redis_1                | Bad directive or wrong number of arguments
laradock_redis_1 exited with code 1
wsewodh2

wsewodh21#

我刚拿掉拉腊多克,还记得以前阻止多克 composer 这

sudo docker-compose down

之后,请重新安装laradock

git submodule add --fource https://github.com/Laradock/laradock.git

然后重新启动要启动的服务
第一个
所有服务均处于启动状态

相关问题