turnbullpress / dockerbook-code

The code and configuration examples from The Docker Book (http://www.dockerbook.com)
929 stars 580 forks source link

Create redis-cli image for testing redis install #17

Closed rcuza closed 8 years ago

rcuza commented 9 years ago

Dear James,

I found this Dockerfile useful while following your examples in The Docker Book. I didn't want to install the redis-tools on the machine I was using, so I made a container to create a throwaway box that had redis-cli installed.

To run the container, I used docker run -ti --rm --name="redis-cli" rac/redis-cli -h $DOCKER_IP -p $REDIS_PORT. This seemed to successfully connected to my running redis container, but I was not able to type anything or get any output. If I run docker attach redis-cli from another terminal window, I am able to type in that terminal and get the expected results (i.e. an interactive redis-cli prompt). I'm chalking this up to my ignorance of docker and redis. As that diminishes, I may update this pull request with a more useful way to execute the redis-cli image.

Thank you for writing such a useful book.

Sincerely, Raúl

jamtur01 commented 8 years ago

Thanks!