Reputation: 23534
I'm using the official ubuntu image and installing redis via apt-get install redis-server
This all works fine, however redis doesn't start. If I connect to the container and run redis-server &
this will start redis in background. I've tried adding RUN redis-server &
but that doesn't seem to work.
Any ideas how to get redis to start?
Upvotes: 2
Views: 4049
Reputation: 337
You can use the following dockerfile and simply change the first line to FROM ubuntu:latest or the specific version you need a run "docker build"
Upvotes: 0
Reputation: 40624
RUN redis-serve
only runs during docker build time.
You can use either CMD redis-server
or ENTRYPOINT redis-server && bash
in your dockerfile.
Upvotes: 2