Key-Value database that talks RESP
java redis docker-container maven-pom sonarqube sonarcloud log4j2 html
-
- Open the command prompt and type in the following:
docker pull fungover/haze
(This downloads the Docker image)
- Open the command prompt and type in the following:
-
- Start a new container with the image, mapping the port 6379 on the host to port 6379 on the container:
docker run -p 6379:6379 fungover/haze
- Start a new container with the image, mapping the port 6379 on the host to port 6379 on the container:
- You can change the behaviour of the server by putting in environment variables when starting the container. For example, you can set the server port to 6440. To do this:
docker run -p 6440:6440 -e HAZE_PORT=6440 fungover/haze
.
Commands that the Server support:
- SET: Sets a value to a key in Redis.
- GET: Retrieves a value to a key in Redis.
- DEL: Removes the specified keys.
- PING: Tests if the Redis server is running. If the server is running, it returns "PONG".
- SETNX: Set the value of a key, only if the key does not already exists.
- EXISTS: Returns if key exists, it returns 1 if the key exists, and 0 otherwise.
- SAVE: Saves the current state of the dataset. It is helpful if you are creating backups or snapshots.
SET key1 "Hi"
GET key1
DEL key1
PING "PONG"
SETNX mykey "Hello"
EXISTS key1