- Make sure that you have docker desktop installed in your computer
- Run
docker pull redis
to install redis on your computer - Run
docker run --name my-redis-container -d -p 6379:6379 redis
to run the redis container
docker run --name my-redis-container -d -p 6379:6379 redis
: turn the container updocker exec -it my-redis-container redis-cli
: terminal now runs with location of docker container.127.0.0.1:6379> ping
: run when termial switches to the container. output is PONG127.0.0.1:6379> exit
: switches the terimal back to orignal location