如何在端口6379以外的端口容器上运行redis
我试图运行官方的Redis Docker映像以外的端口6379,我的问题是,无论我做的端口保持为6379。
有人知道如何configuration一个Docker容器与暴露在主机networking与6379以外的端口的Redis?
而如何用自定义的redis.conf文件呢?
以下是我试图做到这一点:
docker run -v /myredis/conf/redis.conf:/home/arad/redis_conf/users-service-redis.conf --name myredis redis redis-server /home/arad/redis_conf/users-service-redis.conf
当users-service-redis.conf
是我的新的conf文件。
当我尝试它,它仍然在端口6379上运行,即使在我的conf文件中它是这样configuration的:
# Accept connections on the specified port, default is 6379. # If port 0 is specified Redis will not listen on a TCP socket. port 6378 ... ...