sed -i 's/save 900 1/save 3 1/' /etc/redis/redis.conf && \
This line changes Redis's default behaviour of taking a snapshot of the DB file every 15 minutes, and instead forces Redis to backup data every 3 seconds. Motivation for such change is explained in the project I used this image at (read Under The Hood section). Check out Dockerfile I used to build this image.
Warning: do not use this image outside testing environment. Read why.