Code Monkey home page Code Monkey logo

redis-tls-dockerfile's Introduction

Redis with TLS Dockerfile

Redis Logo

Build Status Docker Pulls

This project produces an Open Source Redis Docker image with TLS support. This project uses the base Open Source Redis docker image and stunnel to create a TLS wrapped Redis instance.

Using this Image

Start Redis with TLS:

$ docker run -d -p 6379:6379 -v /path/to/certs:/certs --name redis-tls madflojo/redis-tls

The /path/to/certs should be a directory on the host that contains the appropriate cert.pem and key.pem files for stunnel to provide TLS encryption.

Require password authentication for Redis:

$ docker run -d -p 6379:6379 -v /path/to/certs:/certs --env REDIS_PASS="<<password here>>" \
  --name redis-tls madflojo/redis-tls

Use the $REDIS_PASS environment variable to require clients to authenticate with this Redis server.

Additional Options to Redis Start Command:

$ docker run -d -p 6379:6379 -v /path/to/certs:/certs --env REDIS_PASS="<<password here>>" \
  --env REDIS_CMD_OPTS="--appendonly yes"  --name redis-tls madflojo/redis-tls

Use the $REDIS_CMD_OPTS environment variable to pass any command-line arguments to the Redis server start command.

Start with Persistence:

$ docker run --restart=always -d -p 6379:6379 -v /path/to/certs:/certs \ 
  -v /hostpath/to/redisdatabackup:/data --env REDIS_PASS="<<password here>>" \ 
  --name redis-tls madflojo/redis-tls

To retain data throughout container restarts, use Docker's volume maps to mount the data directory to a host-level directory.

Contributing

Thank you for your interest in helping develop this project. The time, skills, and perspectives you contribute to this project are valued.

How can I contribute?

Bugs, Proposals, Feature Requests, and Questions are all welcome by creating an Issue or using Discussions. Please provide as much detail as you can in your request.

redis-tls-dockerfile's People

Contributors

kishaningithub avatar kleash avatar madflojo avatar zemanlx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

redis-tls-dockerfile's Issues

Redis upgrade

This image refers to redis:latest at the time when this was pushed to docker hub so its frozen in 3.2.3.
Currently, The latest stable version of redis is 4.0.11
The FROM part should refer to this instead of the latest and pushed to docker hub

Redis log out

How can we correctly redirect the logs (stdout, stderr) from redis as well as stunnel to stdout and stderr?

Docker Build Does not work

Guys your docker file does not run with a build it show an error "pip module not found" I solved this using this Dockerfile besed from yours


RUN apk add --no-cache \
    stunnel \
    python3 \
    py3-pip

RUN python3 -m pip install honcho==1.0.*

WORKDIR /
COPY stunnel.conf ProcfileWithoutPwd ProcfileWithPwd start.sh /
RUN chmod +x start.sh

ENV PYTHONUNBUFFERED=1
CMD ["sh", "start.sh"]

The start.sh is wrong too, when I set re REDIS_PASS the shell is calling the profile without password I fix using this start.sh based from yours


if [ -z "$REDIS_PASS" ]
then
    honcho start -f ProcfileWithoutPwd
else
    honcho start -f ProcfileWithPwd
fi

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.