Running Redis on Docker
In this section, we will run the popular open source in-memory cache Redis. Redis is a data structure store, meaning it stores things such as strings, lists, sets, sorted sets, and hashes and supports queries against stored data. Redis has been developed for over a decade, has a large community, and is worth checking out if you have not done so already.
Running Redis as a container for local development makes a lot of sense. By using a container, we don't have to install Redis onto the machine or worry about security permissions. With a container, the setup and security are already done. The limitation, though, is that we only have access to some Redis options. If there is an option that is not supported by the base Redis image, then I recommend you to create custom Redis images using the Redis image as a base.
Starting Redis
Start a Redis container using the run
command:
docker run --name myRedis -p 6379:6379 -d redis
With this command...