Skip to content

Commit

Permalink
Remove the 'd' prefix before all makefile commands
Browse files Browse the repository at this point in the history
  • Loading branch information
Grokzen committed Apr 18, 2015
1 parent 4ab841d commit 6bcd014
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
22 changes: 11 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,31 +5,31 @@ PORTS = -p 7000:7000 -p 7001:7001 -p 7002:7002 -p 7003:7003 -p 7004:7004 -p 7005

help:
@echo "Please use 'make <target>' where <target> is one of"
@echo " dbuild build the docker image containing a redis cluster"
@echo " drebuild rebuilds the image from scratch without using any cached layers"
@echo " drun run the built docker image"
@echo " dbash starts bash inside a running container."
@echo " dclean removes the tmp cid file on disk"
@echo " build build the docker image containing a redis cluster"
@echo " rebuild rebuilds the image from scratch without using any cached layers"
@echo " run run the built docker image"
@echo " bash starts bash inside a running container."
@echo " clean removes the tmp cid file on disk"

dbuild:
build:
@echo "Building docker image..."
docker build -t ${IMAGE_NAME} .

drebuild:
rebuild:
@echo "Rebuilding docker image..."
docker build --no-cache=true -t ${IMAGE_NAME} .

drun:
run:
@echo "Running docker image..."
docker run -d $(PORTS) --cidfile $(CID_FILE) -i -t ${IMAGE_NAME}

dbash:
bash:
docker exec -it $(CID) /bin/bash

dstop:
stop:
docker stop $(CID)
-make dclean

dclean:
clean:
# Cleanup cidfile on disk
-rm $(CID_FILE)
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ Install `docker` on your system. 1.0 or higher is recommended. Instructions can

Download the latest build from docker hub with `docker pull grokzen/redis-cluster`

To build the image run either `make dbuild` or `make drebuild`. It will be built to the image name `grokzen/redis-cluster`.
To build the image run either `make build` or `make rebuild`. It will be built to the image name `grokzen/redis-cluster`.

To start the image run `make drun`. It will be started in the background. To gain access to the running image you can get a bash session by running `make dbash`.
To start the image run `make run`. It will be started in the background. To gain access to the running image you can get a bash session by running `make bash`.

Test to connect to the cluster with `redis-cli -p 7000`. If you do not want to install a redis server on your host to get access to `redis-cli` you can run a `exec` command to run it inside the docker container. It can be done with `docker exec -it <ContainerID> /redis/src/redis-cli -p 7000` where `<ContainerID>` can be found inside the CID file at `/tmp/grokzen-redis-cluster.cid` or via `docker ps`.

Expand Down

0 comments on commit 6bcd014

Please sign in to comment.