I use docker to run redis, on Ubuntu in the virtual machine to refer to other people"s ideas. I create a redis directory that contains a data directory and a redis.conf configuration file, as shown in figure:
redis.confbind 127.0.0.1 daemonize no
redis:
run the command: docker run-- name myredis01-v / redis/redis.conf:/etc/redis/redis.conf-v / redis/data:/data redis redis-server / etc/redis/redis.conf-- appendonly yes
error: Fatal error, can"t open config file"/ etc/redis/redis.conf"
Baidu has not found a suitable solution, so ask here.
the reason I didn"t add-d here is that after adding-d, only the container ID, is returned, but there is no container running when using the docker ps query.
in addition, I have the same steps, which can indeed be mounted successfully on my Ali cloud server. All Ubuntu16.04, but the same operation but different results, this is also what I am very curious about.