docker run -d --name redis -p 6379:6379 redis:7-alpine
Run a detached Redis container
Starts Redis 7 on the Alpine base image in the background, publishing port 6379. The -d flag detaches so the shell returns immediately. Connect from other containers via the network name, not localhost.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.