Introducing our new CEO Don Johnson - Read More

albert0i/redis

By albert0i

Updated 9 months ago

Version 7.2.4 on nanoserver (20H2)

Image
Databases & Storage
0

56

Redis Version 7.2.4 on nanoserver (20H2)

Usage

docker run -p 6379:6379 --rm --name redis -d -v c:\Redis\conf:c:\conf:ro -v c:\Redis\data:c:\data:rw albert0i/redis:7.2.4-nanoserver-20H2

Dockerfile

FROM mcr.microsoft.com/windows/nanoserver:20H2

WORKDIR /Data

USER ContainerAdministrator
RUN setx /M PATH "%PATH%;C:\Redis" &&\
    cd \ &&\
    curl -OL "https://github.com/zkteco-home/redis-windows/archive/refs/heads/master.zip" &&\ 
    tar -C \ -xvf master.zip &&\
    del master.zip &&\
    ren redis-windows-master Redis 
USER ContainerUser

COPY redis.conf /Redis

CMD ["redis-server.exe","C:\\Redis\\redis.conf"]

EXPOSE 6379

docker-compose.yml

version: "3"
services:
  redis:
    build: 
      context: .
    image: 
      albert0i/redis:7.2.4-nanoserver-20H2
    container_name:
        redis
    ports:
      - 6379:6379
    command:
      ["redis-server",  "c:\\conf\\redis.conf"]
    volumes:
      - c:\redis\conf:c:\conf:ro
      - c:\redis\data:c:\data:rw

Note

More on how to facilitate and automate with Makefile. Please check this git hub repository.

EOF (2024/08/01)

Docker Pull Command

docker pull albert0i/redis