Skip to content

Instantly share code, notes, and snippets.

@Markbnj
Created August 11, 2015 21:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Markbnj/a360c338e83533c95ae2 to your computer and use it in GitHub Desktop.
Save Markbnj/a360c338e83533c95ae2 to your computer and use it in GitHub Desktop.
Dockerfile for a simple redis server
# Dockerfile for building a redis server
FROM ubuntu:15.04
MAINTAINER Someone <someone@some.where>
# install and configure redis from source
RUN cd /home/root && \
wget -q http://download.redis.io/redis-stable.tar.gz && \
tar xvzf redis-stable.tar.gz && \
cd redis-stable && \
make && \
cp src/redis-server /usr/local/bin/ && \
cp src/redis-cli /usr/local/bin/ && \
cp src/redis-benchmark /usr/local/bin/ && \
cp src/redis-check-aof /usr/local/bin/ && \
cp src/redis-check-dump /usr/local/bin/ && \
cd .. && \
rm -rf redis-stable && \
rm redis-stable.tar.gz && \
mkdir /etc/redis && \
cp <path to the init file> /etc/init.d/ && \
chmod 755 /etc/init.d/redis_6380 && \
cp <path to the conf file> /etc/redis/ && \
update-rc.d redis_6380 defaults
# expose the following ports:
# 6380 - redis log queue
EXPOSE 6380
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment