Redis 설치

Redis 설치

version: "3"
services:
  redis:
    restart: unless-stopped
    container_name: c-redis
    image: redis:alpine
    command: ['--requirepass "secret"']
    ports:
      - '6379:6379'
    volumes:
      - ./redisdata:/data
$ docker-compose up -d
$ docker exec -it c-redis sh
$ docker exec -it c-redis redis-cli