Skip to content

Commit da3d0d6

Browse files
committed
added some redis starting logic
1 parent aaedc3c commit da3d0d6

File tree

7 files changed

+40
-0
lines changed

7 files changed

+40
-0
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,11 @@ The point is to provide starting points for things like:
77
* [Ansible](https://docs.ansible.com/)
88
* [Vagrant](https://www.vagrantup.com/)
99
* [Virtualbox](https://www.virtualbox.org/)
10+
* [Jenkins](https://jenkins.io/)
1011
* [Make](https://www.gnu.org/software/make/)
1112
* [Python](https://www.python.org/)
1213
* [Flask](http://flask.pocoo.org/)
1314
* [Gunicorn](https://gunicorn.org/)
1415
* [Nginx](https://www.nginx.com/)
1516
* [haproxy](http://www.haproxy.org/)
17+
* [redis](https://redis.io/)

redis/Dockerfile

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
FROM ubuntu:latest
2+
3+
# Apt update and
4+
# Redis build requirements
5+
RUN apt-get update && \
6+
apt-get upgrade -y && \
7+
apt-get install -y wget make gcc
8+
9+
# Required for `make test`
10+
RUN apt-get install -y tcl
11+
12+
# https://redis.io/topics/quickstart
13+
RUN wget http://download.redis.io/redis-stable.tar.gz && \
14+
tar xvzf redis-stable.tar.gz && \
15+
cd redis-stable && \
16+
make && \
17+
make install
18+
19+
CMD redis-server
20+
21+
EXPOSE 6379

redis/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
## Redis Server
2+
3+
See: https://redis.io/
4+
Could have used: https://hub.docker.com/\_/redis/
5+
But, you know. Roll your own.
6+
7+

redis/gethello.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import redis
2+
myred = redis.Redis()
3+
print(myred.get("Hello"))

redis/helloworld.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import redis
2+
myred = redis.Redis()
3+
myred.mset({"Hello": "World"})
4+
print(myred.get("Hello"))

redis/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
redis

redis/runme.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
docker build -t monkeyredis .
2+
docker run -t monkeyredis -p 6379:6379/tcp

0 commit comments

Comments
 (0)