Skip to main content

redis

ben.wangzLess than 1 minute

redis

server

  • mkdir -p $(pwd)/redis/data
    podman run --rm \
        --name redis \
        -p 6379:6379 \
        -d docker.io/library/redis:7.2.4-alpine
    

client

  • podman run --rm \
        -it docker.io/library/redis:7.2.4-alpine \
        redis-cli \
        -h host.containers.internal \
        PING
    
  • podman run --rm \
        -it docker.io/library/redis:7.2.4-alpine \
        redis-cli \
        -h host.containers.internal \
        set mykey somevalue
    
  • podman run --rm \
        -it docker.io/library/redis:7.2.4-alpine \
        redis-cli \
        -h host.containers.internal \
        get mykey
    
  • podman run --rm \
        -it docker.io/library/redis:7.2.4-alpine \
        redis-cli \
        -h host.containers.internal \
        del mykey
    
  • podman run --rm \
        -it docker.io/library/redis:7.2.4-alpine \
        redis-cli \
        -h host.containers.internal \
        get mykey