# Docker quickstart for Redis Enterprise Software Docker containers are currently only supported for development and test environments, not for production. Use [Redis Enterprise on Kubernetes](http://redis.io/docs/latest/operate/kubernetes) for a supported containerized deployment. For testing purposes, you can run Redis Enterprise Software on Docker containers on Linux, Windows, or MacOS. The [Redis Enterprise Software container](http://hub.docker.com/r/redislabs/redis/) acts as a node in a cluster. To get started with a single Redis Enterprise Software container: 1. [Install Docker](#install-docker) for your operating system 2. [Run the Redis Enterprise Software Docker container](#run-the-container) 3. [Set up a cluster](#set-up-a-cluster) 4. [Create a new database](#create-a-database) 5. [Connect to your database](#connect-to-your-database) ## Install Docker Follow the Docker installation instructions for your operating system: - [Linux](http://docs.docker.com/install/#supported-platforms) - [MacOS](http://docs.docker.com/docker-for-mac/install/) - [Windows](http://store.docker.com/editions/community/docker-ce-desktop-windows) ## Run the container To download and start the Redis Enterprise Software Docker container, run the following [`docker run`](http://docs.docker.com/engine/reference/commandline/run/) command in the terminal or command line for your operating system. On Windows, make sure Docker is configured to run Linux-based containers. ```sh docker run -d --cap-add sys_resource --name RE -p 8443:8443 -p 9443:9443 -p 12000:12000 redislabs/redis ``` The example command runs the Docker container with Redis Enterprise Software on `localhost` and opens the following ports: - Port 8443 for HTTPS connections - Port 9443 for [REST API](http://redis.io/docs/latest/operate/rs/references/rest-api) connections - Port 12000 configured Redis database port allowing client connections You can publish other [ports](http://redis.io/docs/latest/operate/rs/networking/port-configurations.md) with `-p :` or use the `--network host` option to open all ports to the host network. ## Set up a cluster ## Create a database ## Connect to your database After you create the Redis database, you can connect to it to begin storing data. ### Use redis-cli inside Docker {#connect-inside-docker} Every installation of Redis Enterprise Software includes the command-line tool [`redis-cli`](http://redis.io/docs/latest/operate/rs/references/cli-utilities/redis-cli) to interact with your Redis database. You can use `redis-cli` to connect to your database from within the same Docker network. Use [`docker exec`](http://docs.docker.com/engine/reference/commandline/exec/) to start an interactive `redis-cli` session in the running Redis Enterprise Software container: ```sh $ docker exec -it redis-cli -h redis-12000.cluster.local -p 12000 127.0.0.1:12000> SET key1 123 OK 127.0.0.1:12000> GET key1 "123" ``` ### Connect from the host environment {#connect-outside-docker} The database you created uses port `12000`, which is also mapped from the Docker container back to the host environment. This lets you use any method you have available locally to [connect to a Redis database](http://redis.io/docs/latest/operate/rs/databases/connect/). Use `localhost` as the `host` and `12000` as the port. ## Test different topologies Docker containers are currently only supported for development and test environments, not for production. Use [Redis Enterprise on Kubernetes](http://redis.io/docs/latest/operate/kubernetes) for a supported containerized deployment. When deploying Redis Enterprise Software using Docker for testing, several common topologies are available, according to your requirements: - [Single-node cluster](#single-node) – For local development or functional testing - [Multi-node cluster on a single host](#multi-node-one-host) – For a small-scale deployment that is similar to production - [Multi-node cluster with multiple hosts](#multi-node-multi-host) – For more predictable performance or high availability compared to single-host deployments ### Single node {#single-node} The simplest topology is to run a single-node Redis Enterprise Software cluster with a single container on a single host machine. You can use this topology for local development or functional testing. Single-node clusters have limited functionality. For example, Redis Enterprise Software can't use replication or protect against failures if the cluster has only one node. ![/images/rs/RS-Docker-container.png](http://redis.io/docs/latest/images/rs/RS-Docker-container.png) ### Multiple nodes on one host {#multi-node-one-host} You can create a multi-node Redis Enterprise Software cluster by deploying multiple containers to a single host machine. The resulting cluster is scale minimized but similar to production deployments. However, this will also have several limitations. For example, you cannot map the same port on multiple containers on the same host. ![/images/rs/RS-Docker-cluster-single-host.png](http://redis.io/docs/latest/images/rs/RS-Docker-cluster-single-host.png) ### Multiple nodes and hosts {#multi-node-multi-host} You can create a multi-node Redis Enterprise Software cluster with multiple containers by deploying each container to a different host machine. This topology minimizes interference between containers, allowing for the testing of more Redis Enterprise Software features. ![/images/rs/RS-Docker-cluster-multi-host.png](http://redis.io/docs/latest/images/rs/RS-Docker-cluster-multi-host.png)