Skip to content

Commit

Permalink
redis cmd exec demo
Browse files Browse the repository at this point in the history
  • Loading branch information
shadjac committed Jan 15, 2019
1 parent 4f8ac0c commit bb9bb9d
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
15 changes: 15 additions & 0 deletions redis-Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM ubuntu:trusty
ENV DEBIAN_FRONTEND noninteractive
RUN \
apt-get update && \
apt-get -y install \
software-properties-common --fix-missing && \
add-apt-repository -y ppa:chris-lea/redis-server && \
apt-get update && \
apt-get -y install \
redis-server --fix-missing && \
rm -rf /var/lib/apt/lists/*
COPY redis-start.sh start.sh
EXPOSE 6379
RUN rm /usr/sbin/policy-rc.d
CMD ["/start.sh"]
8 changes: 8 additions & 0 deletions redis-start.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env bash
# Disable THP Support in kernel
echo never > /sys/kernel/mm/transparent_hugepage/enabled
# TCP backlog setting (defaults to 128)
sysctl -w net.core.somaxconn=16384
#-------------------------------------------------------------------------------
exec /usr/bin/redis-server

0 comments on commit bb9bb9d

Please sign in to comment.