Tag: redis

(mac)docker工人,如何从托pipe人连接到主机中的redis服务器

我正在使用boot2docker在我的mac机器上运行boot2docker : 我想连接到redis-server我正在容器内运行我的主机。 我设法从容器连接到我在主机上运行的服务使用curl http://192.168.3.124:5000 (获取结果) 我设法连接到它,但我不是根据它的状态从它的数据。 redisServer = redis.StrictRedis(host='192.168.3.124', port= "6379"); redisServer.get("2") (gets no results, from the hosting machine that key is set) 详细信息 :运行redis服务器: [58781] 13 May 13:53:16.120 # Server started, Redis version 2.8.19 [58781] 13 May 13:53:16.120 * DB loaded from disk: 0.000 seconds [58781] 13 May 13:53:16.120 * The server is […]

留言簿示例不起作用。 无法连接到MASTER

我有四个小兵和一个在Ubuntu集群上的主人。 我正在关注留言簿示例。 Redis奴隶不与主人沟通。 #kubectl获取节点 NAME LABELS STATUS 172.16.2.73 kubernetes.io/hostname=172.16.2.73 Ready 172.16.2.91 kubernetes.io/hostname=172.16.2.91 Ready 172.16.2.92 kubernetes.io/hostname=172.16.2.92 Ready 172.16.2.96 kubernetes.io/hostname=172.16.2.96 Ready #kubectl得到豆荚 POD IP CONTAINER(S) IMAGE(S) HOST LABELS STATUS CREATED MESSAGE kube-dns-99zoq 10.1.95.2 172.16.2.91/172.16.2.91 k8s-app=kube-dns,kubernetes.io/cluster-service=true,name=kube-dns Running About an hour kube2sky gcr.io/google_containers/kube2sky:1.1 Running About an hour last termination: exit code 1 skydns gcr.io/google_containers/skydns:2015-03-11-001 Running About an hour etcd […]

Celery + Redis任务在Docker上不起作用

我试着为我的Django应用程序设置docker,这个应用程序有Celery和Redis(安装程序正常运行,当我尝试正常运行时,没有docker)。 我的docker-compose文件如下所示: version: '2' services: db: image: postgres:latest env_file: docker-compose.env redis: image: redis:latest command: redis-server ports: – "6379:6379" web: build: . command: dockerize -wait tcp://redis:6379 ./docker-web-entrypoint env_file: docker-compose.env volumes: – .:/project-spartan ports: – "8000:8000" links: – db:db – redis:redis worker: build: . env_file: docker-compose.env command: dockerize -wait tcp://redis:6379 ./docker-worker-entrypoint volumes: – .:/project-spartan links: – db:db […]

不同的Docker容器中不同的python应用程序的芹菜任务

我正在阅读Celery的官方文档 DigitalOcean的教程,并运行相当不错的例子 。 但我无法理解我的应用程序如何在Resque Ruby中进行通信。 例如,我有docker容器中的主要python应用程序,必须为其他容器中的其他2个python应用程序生成任务。 在Resque我的应用程序只是听一些队列,并采取任务,然后做一些工作,推回应答。

将初始数据加载到Redis Docker容器中

我正在尝试基于redis创build一个Redis Docker镜像:3。 但是,我需要将less量的testing数据加载到映像中(它用于在开发人员机器和CI服务器上进行testing)。 我最初的尝试看起来像: FROM redis:3.0.3 MAINTAINER Howard M. Lewis Ship RUN redis-cli sadd production-stores 5555 但是这个错误会失败: Step 2 : RUN redis-cli sadd production-stores 5555 —> Running in 60fb98c133c0 Could not connect to Redis at 127.0.0.1:6379: Connection refused The command '/bin/sh -c redis-cli sadd production-stores 5555' returned a non-zero code: 1 我想知道是否有一个技巧,允许我在Docker文件中连接到通过Dockerfile的CMD / ENTRYPOINT启动的服务器。 正如我现在猜测,运行发生在命令开始之前。 […]

使用Ansible和Docker部署/运行Redis服务

我正在使用Ansible docker模块来设置Redis服务(请参阅下面的安全angular色) – hosts: redis roles: – role: angstwad.docker_ubuntu sudo: true tasks: – name: data container sudo: true docker: name: redis-data image: busybox state: started volumes: – /data/redis – name: redis container sudo: true docker: name: redis-service image: redis:3 command: redis-server –appendonly yes state: started expose: 6379 volumes_from: – redis-data configuration完成后, redis-service容器已经启动,但是当我尝试使用redis-cli连接到redis时,出现以下错误: vagrant@dev1:~$ redis-cli Could […]

无法从外部docker连接到dockerized redis实例

我有最新的docker安装(没有boot2docker),我无法连接到本地运行的dockerized redis实例。 你能告诉我在这里做错了吗? 创build了docker,映射端口6379到127.0.0.1:6379 bash-3.2$ docker run -p 127.0.0.1:6379:6379 –name webmonitor-redis -d redis 3291541d58ab16c362f9e0cd7017d179c0bc9aef3a1323e79f1e1ca075e171c9 dockerps输出: bash-3.2$ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 3291541d58ab redis "/entrypoint.sh redis" 14 seconds ago Up 6 seconds 127.0.0.1:6379->6379/tcp webmonitor-redis 尝试从外部容器(但容器运行在同一主机)连接,连接失败: bash-3.2$ ./src/redis-cli Could not connect to Redis at 127.0.0.1:6379: Connection refused not connected> exit 它工作,如果我尝试从另一个容器连接虽然.. bash-3.2$ […]

Alpine OS上的Php7 Redis客户端

我制作了一个使用Alpine 3.5作为基础图像的docker图像。 我希望我的PHP应用程序在容器内运行,以便与Redis服务器进行通信。但我在Alpine中找不到任何php7-redis客户端。 有没有围绕它的工作?我试图用pecl来安装redis,但没有pecl包在阿尔卑斯山。我尝试过梨,但梨没有redis包。 有关这个问题的任何想法?

Redis哨兵泊坞窗图像/ Dockerfile

我正在考虑在coreOS集群上部署高可用性Redis,并且需要Redis Sentinel Docker镜像(即Dockerfile)。 我已经收集了足够的信息/专业知识来创build一个(我认为)…但是我对先进networking的有限的知识/经验是阻止我build立和分享它的唯一原因。 这里的专家能帮助我开发一个Redis Sentinel Dockerfile(现在不存在)吗? Redis / Docker社区会从中受益。 以下是更广泛的问题和上下文: https : //github.com/antirez/redis/pull/1908 我认为解决scheme就在这里: https : //github.com/antirez/redis/pull/1908#issuecomment-54380876 这里是我一直在使用的Dockerfile …但是如果你阅读上面的线程,你会看到我的评论(joshula)…它缺乏mattsta谈论的networking修复。 请注意,因为我在coreOS上使用它,所以sentinel.conf中的任何configuration设置都将在运行时通过命令行进行设置(因此ENTRYPOINT)。 # Pull base image. FROM dockerfile/ubuntu:latest # Install Redis. RUN \ cd /tmp && \ wget http://download.redis.io/redis-stable.tar.gz && \ tar xvzf redis-stable.tar.gz && \ cd redis-stable && \ make && \ make install && […]

如何使用Docker Compose连接到Redis容器?

这个docker-compose.yml似乎工作正常: version: '3' services: web: image: web-app command: bundle exec rackup ports: – "9292:9292" links: – redis redis: image: redis 命令: docker build -t web-app .; docker-compose up Web应用程序正在等待REDIS_URLconfiguration。 Web应用程序Dockerfile: ENV REDIS_URL redis:6379 看起来Web应用程序无法连接到Redis: Redis::CannotConnectError – Error connecting to Redis on 127.0.0.1:6379 (Errno::ECONNREFUSED): 那么,Web App的Redis URL是什么? 我需要暴露Redis端口(6379)吗? 编辑: 感谢@Andy Shinn,我看到redisurl应该是redis://6379 。 现在我得到Errno::EINVAL – Invalid argument […]