Skip to main content
Version: ACE 4

Redis TLS configuration

This approach allows to build image with TLS certs as env variables.

Dockerfile

Define docker file as below

FROM euadigportalcoredev02acr.azurecr.io/cache-service:${VERSION}

ARG REDIS_CACHE_TLS_KEY
ARG REDIS_CACHE_TLS_CERT
ARG REDIS_CACHE_TLS_CA

ENV REDIS_CACHE_TLS_KEY=$REDIS_CACHE_TLS_KEY
ENV REDIS_CACHE_TLS_CERT=$REDIS_CACHE_TLS_CERT
ENV REDIS_CACHE_TLS_CA=$REDIS_CACHE_TLS_CA

Build script

Create a script file as below to build the docker file. Give correct paths to cert files and name variables as per your need.

export tlsKey=`cat redis_user_private.key`;
export tlsCert=`cat redis_user.crt`;
export tlsCa=`cat redis_ca.pem`;

docker build --build-arg REDIS_CACHE_TLS_KEY="${tlsKey}" --build-arg REDIS_CACHE_TLS_CERT="${tlsCert}" --build-arg REDIS_CACHE_TLS_CA="${tlsCa}" -t "Your_tag" -f <Dockerfile created above> .
info

To use redis tls configuration option in redis step use this approach to build custom image for flow-runner service. Then the same variable names can be used in the step configuration as described in step documentation.

info

To use redis tls configuration option in cache-service, use this approach to build custom image.