yaogengzhu / daily-share

个人博客记录、内容在issues
30 stars 4 forks source link

用docker 快速搭建一个redis 服务 (2023-05-24) #188

Open yaogengzhu opened 1 year ago

yaogengzhu commented 1 year ago

新建一个 docker-compose.yml

version: '3.7'

services:
  redis:
    image: 'redis:latest'
    container_name: 'redis-server'
    command: redis-server --requirepass 你的密码
    ports:
      - '6379:6379'

执行

docker-compose up -d