10

I know that Redis is not supported for Windows (at least newer versions).

My question is can I somehow use official builds of Redis on Windows using a Docker container? since Docker suppose to provide a compatible predictable environment for every platform

1
  • 1
    Just to be clear, Docker doesn't let you run Linux on Windows and vice versa. But WSL2 on Windows runs a Linux VM where you can run Linux programs. Commented Jan 17, 2022 at 18:51

2 Answers 2

7

In short, you can run this

docker run --name redis -d -p 6379:6379 redis:6.0

Your applications will be able to access Redis on localhost:6379

Check this post, if you want a detailed explanation on installing a persisting redis deployment using Volume mounts. link

For more info, check the official docs link

Sign up to request clarification or add additional context in comments.

1 Comment

Exactly what I needed! The -d flag detaches the console from the container. The -p flag binds a port from the container to the host. In this example, we're binding the host port 6379 to the container port 6379.
3

You can either use redis via the WSL or use this image built natively for docker Windows. There is the latest version officially ported by Microsoft as well as the latest versions ported by the community.

Example of a docker command :

docker run --name my-redis -p 6379:6379 -d redis:5.0.14.1-lts-nanoserver-1809

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.