Running Redis Server Using Docker Container
If you want to quickly test the Redis Server in you local environment then this guide is for you. There are other guides, if you want to set it up outside the docker.
Installing the run the Redis container
docker run –name local-redis -p 6379:6379 -d redis
If you need to change the port, just change the port in the command
<Port you want>: 6379
This command will pull the docker image for docker hub and and create a container. The container port is mapped with your local port as mention.
After completion of this command you can check if container is running using command below:
Mostly you application can now interact with Redis server on mention port. No password is required.
Get into the container
If you want to ssh into the container following command can be used:
docker exec -it local-redis sh
You can stop or start the container as you need them in docker.