Skip to content

Instantly share code, notes, and snippets.

@kfei
Last active August 29, 2015 14:10
Show Gist options
  • Save kfei/3e7f6de180ac84dd7fa1 to your computer and use it in GitHub Desktop.
Save kfei/3e7f6de180ac84dd7fa1 to your computer and use it in GitHub Desktop.
Redis Dockerfile
RUN buildDeps='gcc libc6-dev make'; \
set -x \
&& apt-get update && apt-get install -y $buildDeps --no-install-recommends \
&& rm -rf /var/lib/apt/lists/* \
&& mkdir -p /usr/src/redis \
&& curl -sSL "$REDIS_DOWNLOAD_URL" -o redis.tar.gz \
&& echo "$REDIS_DOWNLOAD_SHA1 *redis.tar.gz" | sha1sum -c - \
&& tar -xzf redis.tar.gz -C /usr/src/redis --strip-components=1 \
&& rm redis.tar.gz \
&& make -C /usr/src/redis \
&& make -C /usr/src/redis install \
&& ln -s redis-server "$(dirname "$(which redis-server)")/redis-sentinel" \
&& rm -r /usr/src/redis \
&& apt-get purge -y --auto-remove $buildDeps \
&& apt-get autoremove
@kfei
Copy link
Author

kfei commented Dec 2, 2014

I added the last command.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment